View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff[_2_] Harald Staff[_2_] is offline
external usenet poster
 
Posts: 449
Default Nulls vs. blanks?

This is belief, not knowledge.
An empty spreadsheet cell contains both numeric value 0 and an empty string.
A database field with nothing in it contains NULL , meaning "unknown", which
is not the far more known 0 or empty string.

So who's right? Excel of course ;-)

HTH. Best wishes Harald


"DesertCyclist" wrote in message
...
I have a spreadsheet with a field that may contain blanks (empty). When I
filter on that field to show only the blanks, I get 4000 records returned.
But if I import the spreadsheet into SQL Server, the test in there for
blanks
('') returns nothing. However, if I test for Nulls in that field, I get
5000
records returned. I don't know which one (Excel or SQL Server) is giving
me
the right answer. Can anyone help me understand what's going on?

Thanks!