I'm trying a simple filter on a date column in an Oracle 19c database and getting the following error:
Error: nanodbc/nanodbc.cpp:1655: HY000: [Oracle][ODBC][Ora]ORA-00936: missing expression
It appears that the issue (in my Oracle instance) is caused by the parenthesis surrounding the date in the dbplyr translation
tbl(con, "TEST_TABLE") %>%
filter(DT == as.Date("2020-01-01")) %>%
show_query()
# <SQL>
# SELECT *
# FROM ("TEST_TABLE")
# WHERE ("DT" = DATE('2020-01-01'))
If I run the same query with the parentheses removed in my SQL IDE, the query runs with no error.
SELECT *
FROM ("TEST_TABLE")
WHERE ("DT" = DATE '2020-01-01')