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