Error in rsqlite_send_query(conn@ptr, statement) : near “(”: syntax error

安稳与你 提交于 2019-12-11 08:53:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!