Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 To Null, or NOT to Null

Author  Topic 

Jusvistin
Yak Posting Veteran

81 Posts

Posted - 2003-08-15 : 09:59:35
That is the question....

Do you usually allow nulls ?
If not, why not, and what do you use for unknowns ?


Kevin

MichaelP
Jedi Yak

2489 Posts

Posted - 2003-08-15 : 12:41:14
I use Nulls to describe tasks / processes that have not yet finished. I have a non-nullable StartDate and a Nullable End Date. When the End Date IS NOT NULL then it's done!

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2003-08-15 : 13:53:53
Whether 'tis nobler to use CAST('' AS DATETIME) to suffer
The slings and arrows of outrageous NULL execution plans,


Seriously, I've had execution plans go through the roof using

WHERE MyDate IS NULL

rather than

WHERE Mydate = CAST('' AS DATETIME)

I don't believe this is universally acknowledged, but it saved my bupka to stop using NULL on occasion. (I still use NULL, but keep a close eye on them.)

Sam
Go to Top of Page
   

- Advertisement -