MySQL Forums
Forum List  »  German

CASE in where benutzen
Posted by: Mike Marti
Date: December 08, 2009 08:38AM

Hallo zusammen,

Ich habe in meinem Query einen CASE WHEN THEN drin, und möchte nun das Ergebnis danach in where brauchen, gibt es da eine Möglichkeit? Momentan meint MySQL das sie arrival nicht kennt. Hier mein CASE:

CASE
WHEN rtadates_tbl.rta IS NOT NULL
THEN
DATE_FORMAT(rtadates_tbl.rta, "%d.%m.%Y")
WHEN rtadates.rta IS NOT NULL
THEN
DATE_FORMAT(rtadates.rta, "%d.%m.%Y")
ELSE
DATE_FORMAT(so0210.soeta, "%d.%m.%Y")
END AS arrival,

Gruss Mike

Options: ReplyQuote


Subject
Views
Written By
Posted
CASE in where benutzen
3069
December 08, 2009 08:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.