I can run this query in sqlplus against an oracle table, it works I get results back:
SELECT * FROM KEYNOTE_PRD WHERE KEYNOTE_PRD."Site"='High Frequency NY Traffic'
but I try to same with the following code within R:
tryCatch({
ch=odbcConnect("<id>",pwd = "<passwd>")
sql<-c("SELECT * FROM KEYNOTE_PRD WHERE KEYNOTE_PRD."Site"='High Frequency NY Traffic'")
res<-sqlQuery(ch, sql)
},error = function(e) {
print(odbcGetErrMsg(ch))
print("retrive or connect to the db")
})
odbcClose(ch)
It does not work. I think it does not like the double quotes within double quotes (KEYNOTE_PRD."Site"). Any ideas how would I get around this?