Dear R-list,

I'm queering a M$ Access database with the sqlQuery function from the RODBC 
library. As I cannot make a working example with a database here is an 
illustrative example,

library(RODBC)
mdbConnect<-odbcConnectAccess("S:/data/ ... /databse.mdb")
data <- sqlQuery(mdbConnect, "select id, DOB, V1, V2, ..., V1009, V1011, V1013 
from someTable")

I want everything in the table (someTable), except 'V1010' and 'V1012,' but I 
can't figure out how to make a negative or reverse SQL select statement. I have 
a lot of someTables and I have two or three variables in each table that I do 
not want R to fetch,

Is there a way to define a reverse select in SQL? One would imagine it would 
look something like this,

data <- sqlQuery(mdbConnect, "deselect V1010, V1o12 from someTable")

Thanks,
Eric

______________________________________________
R-help@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.

Reply via email to