Re: [R] sqlQuery with date attribute

2008-08-13 Thread Abderrazzak MANY
Thank you for your answer. Actually, I've tried with this function where I added the # symbol between the date: GetReturn<-function(code,date) { db<-"C:/Test.mdb" channel<-odbcConnectAccess(db) ssql<-paste("select * from tblCalendarDate Where CalendarID =",code,"and DateRebal= #",date,"#")

Re: [R] sqlQuery with date attribute

2008-08-13 Thread Samuel Bächler
Hi Many GetReturn<-function(code,date) { db<-"C:/Test.mdb" channel<-odbcConnectAccess(db) ssql<-paste("select * from tblCalendarDate Where CalendarID =",code,"and DateRebal >=",date) print(ssql)# so as i can see what ssql contains mydata<-sqlQuery(channel,ssql) mydata } [snip] This is th