V4RB: problem with dates

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Sep 19 14:30:11 CDT 2004


On 9/19/04 1:50 PM, "Claudius Sailer" <Claudius at sailer-online.de> wrote:

Hi Claudius,

> I have a little CodeGenerator (User can click a report together, also
> with restrictions) which buolds following Code
> 
> 
> SELECT t1.BDatum, t2.Konto_Name, t3.Konto_Name, t4.Kategorie_Name,
> t1.Betrag, t1.Kommentar
> FROM Buchungen t1, Konten t2, Konten t3, Kategorien t4
> WHERE t1.Herk_Konto=t2.RecID
> AND t1.Ziel_Konto=t3.RecID
> AND t1.Kategorie_ID=t4.RecID
> AND ( t4.Kategorie_Name='Nahrungsmittel'
> AND t1.BDatum>='01.03.2004'
> AND t1.BDatum<='31.03.2004'
> )
> ORDER BY t1.BDatum ASC
> 
> Problem is, that I get alle records, but the restriction
> "t1.BDatum>='01.03.2004'" doesn't work correct. I get all records which
> have BDatum <='31.03.2004'.


 
> when I use following Code
> 
> ELECT t1.BDatum, t2.Konto_Name, t3.Konto_Name, t4.Kategorie_Name,
> t1.Betrag, t1.Kommentar
> FROM Buchungen t1, Konten t2, Konten t3, Kategorien t4
> WHERE t1.Herk_Konto=t2.RecID
> AND t1.Ziel_Konto=t3.RecID
> AND t1.Kategorie_ID=t4.RecID
> AND ( t1.BDatum>='01.03.2004'
> AND t1.BDatum<='31.03.2004'
> AND t4.Kategorie_Name='Nahrungsmittel'
> )
> ORDER BY t1.BDatum ASC
> 
> everything is fine.
> 
> Is this a bug in valentina?

I think the first query will work if you add () around dates

> SELECT t1.BDatum, t2.Konto_Name, t3.Konto_Name, t4.Kategorie_Name,
> t1.Betrag, t1.Kommentar
> FROM Buchungen t1, Konten t2, Konten t3, Kategorien t4
> WHERE t1.Herk_Konto=t2.RecID
> AND t1.Ziel_Konto=t3.RecID
> AND t1.Kategorie_ID=t4.RecID
> AND ( t4.Kategorie_Name='Nahrungsmittel'
> AND (t1.BDatum>='01.03.2004'
> AND t1.BDatum<='31.03.2004')
> )
> ORDER BY t1.BDatum ASC



-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list