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
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
Use
length
andrightstr
. 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