Skip to Content
0
Former Member
Mar 31, 2011 at 02:11 PM

Non Null, Non blank but,empty values in JDT1

24 Views

Hello All,

I have a customer SAP database that returns the following results:

Select Count (*) from JDT1 T0 (357236) -- There are 357236 records

Select Count (*) from JDT1 T0 where t0.[Profitcode] = NULL (0) -- There are no Null values

Select Count (*) from JDT1 T0 where t0.[Profitcode] = '' (177730) -- There are 177730 empty records

Select Count (*) from JDT1 T0 where t0.[Profitcode] != '' (155631) -- There are 155631 Non empty records

-- I make that 333361 records - but I would expect everything that is blank and everything that is not blank to be Exhaustive, this should add up to the same as the first query surely?

Select (Select Count () from JDT1 T0 where t0.[Profitcode] = '')+(Select Count () from JDT1 T0 where t0.[Profitcode] != '') (333361) -- Apparently SQL agrees with the count

-- That leaves me wondering what the other 23875 values are? not null not blank and not something that is not blank...?

What could the missing values be?

Kind regards

Tristan