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)
 Date and Null in a query

Author  Topic 

nhaas
Yak Posting Veteran

90 Posts

Posted - 2007-05-03 : 00:13:04
I am trying to get a count of extensions with no INactivedate. so if there is nothing in the column it is Null? but when I run the query I get into some trouble.

SELECT COUNT(SiteID) AS countme
FROM dbo.Extensions
WHERE (SiteID = '11') AND (InactiveDate <> 'NULL')

thank you

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-05-03 : 00:16:22
[code]SELECT COUNT(SiteID) AS countme
FROM dbo.Extensions
WHERE SiteID = '11' AND InactiveDate Is Not NULL[/code]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

nhaas
Yak Posting Veteran

90 Posts

Posted - 2007-05-03 : 00:29:27
Worked great! thanks for the fast reply
Go to Top of Page
   

- Advertisement -