SQL Null values

when i try the following query it does not work.
CASE WHEN Resource.EmployedBy = NULL THEN 'UNKNOWN' ELSE Resource.EmployedBy END AS EmployedBy,

or

CASE WHEN Resource.EmployedBy  ISNULL THEN 'UNKNOWN' ELSE Resource.EmployedBy END AS EmployedBy,
aneilgAsked:
Who is Participating?
 
CluskittCommented:
CASE WHEN Resource.EmployedBy  IS NULL THEN 'UNKNOWN' ELSE Resource.EmployedBy END AS EmployedBy,


You have to separate IS and NULL
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
IS NULL  should do
0
 
jimyXCommented:
You can use IsNull:
ISNULL(Resource.EmployedBy, 'UNKNOWN')
0
 
SharathData EngineerCommented:
ISNULL or COALESCE would be sufficient here.

COALESCE(Resource.EmployedBy, 'UNKNOWN')
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.