[V4RB] Query returning unmatched records

Stan Busk maxprog at mac.com
Wed Nov 30 15:39:33 CST 2005


Interesting, I searched the web on how do to that, so:

WHERE ( myDate BETWEEN date'1/1/2001' AND date'1/31/2001' )

is correct? If so I will try it. myDate is a DateTime field.

Stan

> Hello Stan,
>
> Tuesday, November 29, 2005, 2:12:13 PM, you wrote:
>
> SB> Hi,
>
> SB> I have the following query:
>
> SB> SELECT SUM(myField)
> SB> FROM myTable
> SB> WHERE ( myDate BETWEEN '1/1/2001' AND '1/31/2001' )
> SB> AND aMisc1 = false
> SB> AND aMisc2 = false
>
> SB> It returns records however they are not matching the query,  
> actually
> SB> it never returns what it should.
> SB> Is there anything I should know? I can't see why that query  
> doesn't
> SB> work right now.
>
> I guess myDate is VDate field?
> You  should  use  the  date-literals  instead  of string one.
>  ...
>  WHERE ( myDate BETWEEN date'1/1/2001' AND date'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