[R] sqldf syntax
Gabor Grothendieck
ggrothendieck at gmail.com
Thu Aug 26 22:26:29 CEST 2010
On Thu, Aug 26, 2010 at 2:31 PM, Bond, Stephen <Stephen.Bond at cibc.com> wrote:
> Please correct the following
>
>> sqldf("update esc left join forwagg on esc.ym=forwagg.Date set esc.ri2=forwagg.N1 where esc.age=12","select * from main.esc")
> Error in sqliteExecStatement(con, statement, bind.data) :
> RS-DBI driver: (error in statement: near "left": syntax error)
>
1. sqldf takes one sql argument whereas the above has two sql
arguments; however, the one argument may be a vector of sql commands.
See ?sqldf and the examples on the sqldf home page
http://sqldf.googlecode.com
2. there is an error in the syntax of your update statement. For
correct syntax see the sqlite site:
http://sqlite.org/lang_update.html
--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com
More information about the R-help
mailing list