Re: [R] sqlQuery and string selection

From: paul sorenson (sosman) <>
Date: Thu 20 Oct 2005 - 08:05:59 EST

(sorry if a duplicate pops through ...)
Jérôme Lemaître wrote:
> Dear alls,
> Could someone tell me how to select a subset of string observations (e.g.
> "females" in a sex column) with sqlQuery in the RODBC library?
> Indeed, I'm trying to select a subset of observations on my access database
> with:
> female<-sqlQuery(mychannel,"SELECT
> FROM Micromammiferes
> WHERE ((("females"));")
> The sql works well in access but in R, I keep getting:
> Error: syntax error.

Most computer software has problems with nested quote characters.


 > x = "SELECT FROM Micromammiferes WHERE ((("females"));"

also results in a syntax error (my mailer split the line). mailing list PLEASE do read the posting guide! Received on Thu Oct 20 08:18:05 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 19:07:24 EST