I am trying to check for nulls using a case statement but it not does perform the check correctly, below is the different ways i have tried to do this.
CASE id WHEN NULL THEN 'id is null' END;
CASE id WHEN (id is NULL) THEN 'id is null' END;
CASE id WHEN isnull(id) THEN 'id is null' END;
Neither seem to be working they way i want it. The first one does not work at all, the last two correctly identify rows where id has an empty string value, but does not see rows where the id is null.
You will want to use:
another way is to use
inline IFstatement (if you are interested other thanCASE)