I'm trying to use native sql functions within sqldf
such as month
. I am not sure why this doesn't work. There is monthly data in the dataframe which I am pulling from so I don't understand. If I subset it in dbGetQuery, then it works since it is pulling directly from the MySQL database, but when I try to do the same with the sqldf
package it fails.
sqldf("select * from data_old_cust where month(order_date) = 1", drv = 'SQLite')
Error in sqliteSendQuery(con, statement, bind.data) : error in statement: no such function: month