Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Help - Case

Status
Not open for further replies.

Bell1991

Programmer
Aug 20, 2003
386
US
I have the following query:

Select
Count(case(dtDate)
when null then 1
end ) dtDate ,
count(case(dtDate)
when not null then 1
end )dtDateNull
from tblName


The second case statement does not work... How can i get a count of all the dates that are null?

Thanks in advance..

-Bell
 
Got it:

Select
count(case
when dtDateis not null then 1
end )dtDateNotNull
from tblName

Thanks anyway!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top