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,"#")
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
Hello R users,
I would like to use an integer and a date as attributes in sqlQuery,
and these arguments
are defined in my function.
I guess this is clearer comparing to my first post.
Here is my function:
GetReturn<-function(code,date)
{
db<-"C:/Test.mdb"
channel<-odbcConnectAccess(db)
ssql<
3 matches
Mail list logo