Why does this query not work for NULL?
Posted on 2014-04-16
I have a recordset that looks like this in SQL Server Studio:
Chief Financial Officer
Group Vice President
Regional Vice President
Area Vice President NULL
Chief Financial Officer NULL
Vice President NULL
As I'm looping through my results, I'm trying to check to see if the overridename column is NULL. I don't care if it's empty, I want to know if it's NULL.
echo $workqueueexclusiverolelist[$i]["defaultname"]." | corp (unassigned)";
The result that I get from the above gives me every row without a value as opposed to only those that are NULL.
What am I doing wrong? How can I better craft my query so I'm getting only those rows that are NULL as opposed to everything that's empty?