Re: the difference between NULL and ' ':an interseting result
Date: 5 Jan 1994 17:08:54 GMT
Message-ID: <2ges76$nbh_at_Joanna.Wes.Army.Mil>
Here's another case - not an experiment, but a situation I discovered in a database I'm building. I have a field defined as char(2). I was doing count/group by against this field and found a large number that had null values in the field - determined by "select count where field is NULL". But there was another group that showed on the report as having {nothing} in the field - 27379 observations, to be exact. I tried "select count where field = ' '" - 0 observations. I tried "select count where field = ' '" - 0 observations. Then I tried "select count where field like ' %'" - you guessed it, 27379 observations. So it matched on {space}-something, but not {space} and not {space-space}. So - what's in that field? It's not crucial to the application, but I'm really baffled.
Harry Boswell u4imcehb_at_apollo.wes.army.milComputer Scientist
Information Technology Laboratory
U.S. Army Corps of Engineers
"select std_disclaimer from opinions_not_shared_by_employer" Received on Wed Jan 05 1994 - 18:08:54 CET