V4RB2 Checking date in SQL

Claudius Sailer Claudius at sailer-online.de
Sat Apr 9 18:16:31 CDT 2005


Hi,

I use follwoing Coding

SELECT B.BDatum, HK.Konto_Typ, ZK.Konto_Typ, K.Kategorie_Name, 
K.Kategorie_Art, SF.SYM_NAME, F.ID, F.FName, K.LfdNr,
	CASE
		WHEN HK.Konto_Typ=true AND K.Kategorie_Art=1 THEN B.Betrag * (-1)
		WHEN HK.Konto_Typ=false AND K.Kategorie_Art=2 THEN B.Betrag * (-1)
		ELSE B.Betrag
		END
FROM Buchungen B, Konten HK, Konten ZK, Kategorien K, Steuerfuchsfelder 
SF, Formulare F
WHERE B.Herk_Konto=HK.RecID
AND B.Ziel_Konto=ZK.RecID
AND B.Kategorie_ID=K.RecID
AND K.SteuerFeld=SF.RecID
AND SF.FArt=F.RecID
AND B.Deleted='0'
AND B.BDatum>='01.01.2004'
AND B.BDatum<='31.12.2004'
AND HK.Konto_Typ <> ZK.Konto_Typ
ORDER BY F.ID, K.LfdNr, SF.SYM_NAME, B.BDatum

result is 0 records. I know I have. When I deactivate following rows

AND B.BDatum>='01.01.2004'
AND B.BDatum<='31.12.2004'

I get results where I also can see that I have also values in 2004. 
What is my fault?
Dateformat is 1 ans separator is "."

In 1.10 this coding worked....

thanks


Claudius



More information about the Valentina mailing list