SQL - The field contains NULL, 0 or 1 - i want to see anything but 1 - how to write

Brass Contributor



I only want the column to bring back 0 or NULL - ive tried 


  • <>1      but that only brings back 0  


  • IN (N' ', N'0') but doesnt like it,
  • LIKE...
  • NOT = N'1'


nothing works, they all bring back (if work at all) 0 and not NULL and there are definitely NULL in the data






1 Reply


If you return back to Excel grid it doesn't support blank as a value, null is auto-lifted to zero. You may return empty string ("") instaed.