[R] Quoting Issues in RODBC SQL Queries

Frank Gerrit Zoellner fzoellne at TechFak.Uni-Bielefeld.DE
Thu Feb 15 13:16:09 CET 2001


Hi!

I've got a question about quoting in sql statements.
I'm using the RODBC package for connecting to the database(mysql).
I want to do the following select :

resultset<-sqlQuery(con,"select chi1,AVG(energytype) from amberenergy,rotamerlibrary where amberenergy.RId = rotamerlibrary.RId and res_id= as.selection group by chi1",as="matrix")

where energytype and as.selection are variables 
How do I have to quote the sql statement so that the values of the variables are placed in the sql statement? 

Thanks
-- 
Frank Gerrit Zoellner


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list