Thema: Delphi MySQL SELECT mit IF ?

Einzelnen Beitrag anzeigen

static_cast

Registriert seit: 19. Okt 2003
Ort: Peine
300 Beiträge
 
#5

Re: MySQL SELECT mit IF ?

  Alt 21. Dez 2004, 13:53
Hey danke euch zwei, geht wunderbar!

Hab es jetzt so, da konnte ich ja gleich noch die abfrage auf NULL mit einbaun =)
SQL-Code:
SELECT idx, sortkey, filename, hashname, hash, owner,
CASE WHEN (
mail = ''
)
OR (
mail = NULL
)
THEN 'No Mail'
ELSE mail
END AS mail, description, deletekey, size, uploadtime, ip, listingkey, insertmode
FROM images
Aber muss ich wirklich alle Felder auflisten? Wie läßtig wird das erst wenn ich mehr habe als die paar? Ohwei...

//Edit: Danke PRehders, das ist ja noch Einfacher
Daniel M.
"The WM_NULL message performs no operation. An application sends the WM_NULL message if it wants to post a message that the recipient window will ignore."
  Mit Zitat antworten Zitat