>I am trying to create a query whereby the results will be given between 2 dates. My query is below. This does not work! My question would then be Is it possible to use the BETWEEN statement in an SQL?
>
>
>WITH thisform.pageframe1.page3.list3
> .RowSourcetype = 3
> .Rowsource = 'SELECT mainkey FROM pdmlog' + ;
> ' WHERE pdmlog.type="Change" and'+;
' pdmlog.database="COST2"' + ;
> ' and BETWEEN(pdmlog.date,{^2003-04-01},{^2003-04-02})'+;
' INTO CURSOR result'
>ENDWITH
>
>
>Many Thanks in Advance
Neil,
It's perfectly valid syntax. You might change to :
pdmlog.date BETWEEN {^2003-04-01} and {^2003-04-02}
I think while saying it doesn't work it returns no records.
Check what does :
SELECT distinct Type, Database FROM pdmlog ;
WHERE pdmlog.date BETWEEN {^2003-04-01} and {^2003-04-02}
return.
Cetin