SQL-Question

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Mar 6 12:54:07 CST 2005


On 3/6/05 12:47 PM, "Claudius Sailer" <Claudius at sailer-online.de> wrote:

> SELECT B.RecID, B.BDatum, KZ.Konto_Name, K.Kategorie_Name,
> Case when B.Ziel_Konto=KZ.RecID then B.Betrag ELSE null END,
> Case when B.Herk_Konto=KZ.RecID then B.Betrag ELSE null END,
> B.Kommentar, B.Blocked
> FROM Buchungen B, Kategorien K, Konten KZ
> WHERE B.Kategorie_ID=K.RecID
> AND ((B.Ziel_Konto=KZ.RecID AND B.Herk_Konto='13')
> OR (B.Herk_Konto=KZ.RecID AND B.Ziel_Konto='13'))
> AND B.Deleted='0'
> ORDER BY B.BDatum, KZ.Konto_Name, K.Kategorie_Name
> 
> now I get in ViSQL following ErrorMessage
> 
> Error 591115 Function "SearchedCase" - wrong param "Else" value.

Please split this query on more simple at first.

I mean remove CASE and check that join itself works correctly.

It seems to me you use OR for JOIN CONDITIONS.
Sorry to say that we have not made this yet in 2.0.
May be day of work, but we still not done.

So first of all please make sure that your join works.

-- 
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-beta mailing list