Running a query using dplyr on a microsoft access database from R 3.6.2 using DBI and odbc results in a syntax error "missing operator".
The query:
db %>%
filter(year(Date) == 2017)
The field Date is stored as This query has worked for me in the past. From the error message I can see that it is translated as (EXTRACT(year FROM `Date`) = 2017.0)
, which to my knowledge should be valid SQL.
Have I stumbled on a bug or am I doing something wrong? If so, what is the correct way of doing this?