> ssql<-paste("select * from tblCalendarDate Where CalendarID
> =",code,"and DateRebal >=",date)
> print(ssql) # so as i can see what ssql contains
> This is the content of my table tblCalendarDate:
> CalendarID DateRebal
> 1 29/09/2006
> 1 10/10/2006
> 1 20/10/2006
> 1 31/10/2006
> 1 10/11/2006
> 1 20/11/2006
> Actually, the channel is open but the query on the table did not
> perform the query correctly, here is the
> result of the function when i run GetReturn(1,"2007-03-01") for example:
Something with the formatting of the date goes wrong as I think. In the table tblCalendarDate you have it
like *29/09/2006* but in your function you have it as *"2007-03-01"*. Dig deeper by experimenting with
the dates format. You can experiment in Access itself to see what kind of dates Access accepts.
Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Archive generated by hypermail 2.2.0, at Wed 13 Aug 2008 - 09:33:32 GMT.
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.
list of date sections of archive