{Resolved} A CASE statement looking for NULL
Hi,
I try to do this:
Code:
CASE HAE1.idStatutEmploi
WHEN NULL THEN 'Employeur'
ELSE 'Profil emploi'
END AS TypeAdresse,
It never set the field TypeAdresse to "Employeur", but it should, I have many HAE1.idStatutEmploi set at NULL in my database.
I guess my code is just not efficient.
EDIT:
OK .. found it.
Code:
CASE
WHEN HAE1.idStatutEmploi IS NULL THEN 'Employeur'
ELSE 'Profil emploi'
END AS TypeAdresse,
Re: A CASE statement looking for NULL
Id this in a vb proc or in an SQL statement?
If it is in an SQL statement it should be
Code:
CASE WHEN HAE1.idStatutEmploi IS NULL
THEN 'Employeur'
ELSE 'Profil emploi'
END AS TypeAdresse