下面的代码行:
sqldf("UPDATE q1_sql_1 SET MONTH_YEAR = RIGHT(MONTH_YEAR, LEN(MONTH_YEAR) - 4)")
显示此错误:
Error in rsqlite_send_query(conn@ptr, statement) : near "(": syntax error
使用length和rightstr。有关SQLite中可用的功能,请参见:
length
rightstr
https://www.sqlite.org/lang_corefunc.html
对于RSQLite也可以使用的贡献函数:
https://github.com/ggrothendieck/sqldf#example-15-use-of-rsqliteextfuns- library-functions