Question : Date Field = ' '

Look at the attached image.  When I add the below SQL statement no records are returned

and isNull(ProductStatusDate, '') <> ''
and (dateadd(dd, isNull(convert(integer, WarrantyDays), 0), ProductStatusDate) >= getdate())

Can anyone explain why?  I've tried both separately and together and still do not receive any data.
Attachments:
 
 

Answer : Date Field = ' '

well with

and isNull(ProductStatusDate, '') <> ''

you are surely filtering the example you given, because '1900-01-01' is like having a null value.

Have you considered

and isNull(ProductStatusDate, '') = ''

instead?

Random Solutions  
 
programming4us programming4us