What is the recommended way to find records (i.e. in the SQL WHERE clause) with a field that may have “missing”, null, or empty-string values?
I am using
IS NULL to find records with null fields. For whatever reason != is not working (at least in 3.0.x). Additionally, you can match the empty string to make sure you receive all records need:
SELECT FROM ANYCLASS WHERE value IS NULL OR value = ''
Hope it helps.
Thanks. And yes,
value IS NULL OR value = '' is my current solution. I was wondering if there was a clearer way to do this. Something like an