[R] SQLDF syntax

new2R bv_agrico at yahoo.co.in
Tue Apr 19 00:34:09 CEST 2011


I am new to R and trying to migrate from SAS. I am trying to use sqldf to
create a new table from existed table and change some of the columns. I have
table called DataOld with columns commodity, rate and total and I am trying
to create new table called DataNew with columns commodity, ratenew and

> sqldf("create table datanew as select commodity, ratenew as rate * 10,
> totalnew as total *10 from DataOld")

I got error message " Error in sqliteExecStatement(con, statement,
bind.data) : 
  RS-DBI driver: (error in statement: near "*": syntax error)

Please help me in this regard.

Thank you

View this message in context: http://r.789695.n4.nabble.com/SQLDF-syntax-tp3458919p3458919.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list