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
 Transact-SQL (2000)
 Query Non Nulls on Date Field

Author  Topic 

homerjay80
Starting Member

26 Posts

Posted - 2007-03-21 : 19:22:16
I am trying to query a a date field in SQL server to see if its not null.

what is the correct syntax

Here is what I am trying:
Select datestop
from table where datestop Is not Null

It returns no results but I know their is records where NULL is not present.

Thanks

krishnarajeesh
Yak Posting Veteran

67 Posts

Posted - 2007-03-22 : 02:47:26
Hi,

The query you are using is correct.
Also see my below example.

"Select panelID from ffunit where panelID Is not Null"


Thanks & Best Regards,
Krishna
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-22 : 02:49:31
are you sure there are NULL record or record with empty string ?

Try

Select datestop
from table where datestop = ''



KH

Go to Top of Page
   

- Advertisement -