ROracle date manipulation

Hi,

I installed ROracle on my computer and successfully connected to a remote Oracle database. I can interact with the tables using dbplyr and collect the data on my computer. But when I try to filter the date columns using dplyr filter function I get error like this:
Error in .valueClassTest(ans, "data.frame", "fetch") : invalid value from generic function ‘fetch’, class “try-error”, expected “data.frame”

The date columns display as datetime but the lubridate functions do not work (fe converting datetime to date using as_date) on them, but do not throw any error and base-r as.Date throws this error:

Error in .oci.SendQuery(conn, statement, data = data, prefetch = prefetch,  : 
  ORA-00936: missing expression

If I collect the data on my computer the datetime columns display correctly and work with all aformentioned functions.

Thank you.

Solved the issue by using SQL native function in dplyr pipe with right date mask.

#setup db connection con... 
tbl(con, "my_tbl") %>%
        filter(Dates_column <= to_date('04.11.2021','DD.MM.YYYY'))

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.