Monday, March 19, 2012

date IS NULL not working......?

Hi,

I have a problem with a SQL that check if a date column IS NULL.
On one server the check work ok but on another (the same data is on both - restored copy) the check does not find any NULL values.
If check where datecolumn =convert(datetime,'9999-12-31 23:59:59.000',121) I get the same result as when checking for NULL in the other.

Is there any parameter set somewhere that tell the server to return a value even if NULL is stored in the database?

thank you for reading,
YakoBayIs there any parameter set somewhere that tell the server to return a value even if NULL is stored in the database?

I'd be very surprised.|||Have you tried ISNULL( column, 'default value' )?|||See COALESCE in BOL.

No comments:

Post a Comment