[R] SQLDF syntax

From: new2R <bv_agrico_at_yahoo.co.in>
Date: Mon, 18 Apr 2011 15:34:09 -0700 (PDT)


Hi,

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 totalNew.

> 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.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 19 Apr 2011 - 04:45:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 19 Apr 2011 - 14:40:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive