You are here: Working with NULLS « MsSQL Server « IT news, forums, messages
Working with NULLS

Posted by rcamarda on 07/27/06 17:40

I have a field that may be null which is valid, and I am finding
something I didnt expect when working with nulls.
SELECT NULL/4.0 will return NULL (which I expect), however, when I test
it with a case it does not:

SELECT NULL/4.0 AS 'TEST1', TEST2 = CASE NULL/4.0 WHEN NULL THEN
'HURAY' ELSE 'OH DARN' END

I can work around by testing for NULL first else CASE ..., but I'd like
to understand why the CASE does not test for null.
TIA
rob
SQL 2005 Enterprise x64, SP1

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация