问题
The following line of code:
sqldf("UPDATE q1_sql_1 SET MONTH_YEAR = RIGHT(MONTH_YEAR, LEN(MONTH_YEAR) - 4)")
Shows this error:
Error in rsqlite_send_query(conn@ptr, statement) : near "(": syntax error
回答1:
Use length
and rightstr
. For the functions available in SQLite see:
https://www.sqlite.org/lang_corefunc.html
and for the contributed functions that RSQLite also makes available:
https://github.com/ggrothendieck/sqldf#example-15-use-of-rsqliteextfuns-library-functions
来源:https://stackoverflow.com/questions/48739447/error-in-rsqlite-send-queryconnptr-statement-near-syntax-error