rsqlite_send_query中的错误(conn @ptr,statement):near"(":语法错误

时间:2018-02-12 04:14:04

标签: sql r sql-update rsqlite

以下代码行:

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

1 个答案:

答案 0 :(得分:1)

使用lengthrightstr。对于SQLite中可用的函数,请参阅:

https://www.sqlite.org/lang_corefunc.html

以及RSQLite提供的贡献函数:

https://github.com/ggrothendieck/sqldf#example-15-use-of-rsqliteextfuns-library-functions