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.
| Author |
Topic |
|
SQLSeeker
Starting Member
15 Posts |
Posted - 2009-10-14 : 08:59:27
|
| Hello Friends, There is a column whose data type is DateTime which can contain NULL value. Now I want to compare this Column with Null. Select * from testtbl where exdt(Datetime) = NULL This query doesn't work. Suggest any other ways to achieve this.Thanks |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-10-14 : 09:03:26
|
NULL values always compare with: WHERE Column IS NULLorWHERE Column IS NOT NULL No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-10-14 : 09:13:43
|
| What is exdt? a function?MadhivananFailing to plan is Planning to fail |
 |
|
|
SQLSeeker
Starting Member
15 Posts |
Posted - 2009-10-14 : 09:37:30
|
| hi, Column IS NULL works. Thanks |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-10-14 : 09:39:15
|
quote: Originally posted by SQLSeeker hi, Column IS NULL works. Thanks
Did you read my first reply? MadhivananFailing to plan is Planning to fail |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-10-14 : 09:42:08
|
I assume that exdt is the columnname and (Datetime) was a hint for us to know that it is a datetime column. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-10-14 : 09:46:22
|
quote: Originally posted by webfred I assume that exdt is the columnname and (Datetime) was a hint for us to know that it is a datetime column. No, you're never too old to Yak'n'Roll if you're too young to die.
I think you are correct MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|