[V4RB] Query returning unmatched records ( DATE BETWEEN xxx AND yyy )

Stan Busk maxprog at mac.com
Fri Dec 9 20:18:30 CST 2005


Hi,

Yes, WHERE ( myDate BETWEEN datetime'1/1/2001' AND  
datetime'1/31/2001' ) works fine!

Thanks,
Stan

> Hello Stan,
>
> Thursday, December 8, 2005, 7:34:15 PM, you wrote:
>
> SB> Hi,
>
> SB> Yes, this is true, I read this in SQL92 doc as well but seems it
> SB> doesn't work with Valentina.
>
> SB> This:
> SB> fldDate BETWEEN 'MM/DD/YYYY' AND 'MM/DD/YYYY'
> SB> returns the right record number.
>
> SB> This:
> SB> fldDate BETWEEN DATE 'MM/DD/YYYY' AND DATE 'MM/DD/YYYY'
> SB> never returns records. Never raises an exception either.
>
> SB> Stan
>
>>> SB> Interesting, I searched the web on how do to that, so:
>>>
>>> SB> WHERE ( myDate BETWEEN date'1/1/2001' AND date'1/31/2001' )
>>>
>>> SB> is correct? If so I will try it. myDate is a DateTime field.
>>>
>
> I'm sorry I have missed that you operate with DateTime field.
> So you should use DateTime literals.
>
> WHERE ( myDate BETWEEN datetime'1/1/2001' AND datetime'1/31/2001' )
>
> -- 
> Best regards,
>  Ivan                            mailto:IvanSmahin at public.kherson.ua
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list