Sorry for being criptic but here it my question
Will this query work if not what will?
SELECT column1,column2 ,column3,
count ('column4alias' =
case
when column4 IS 'Y' then 'yes'
when column4 IS 'N' then 'No'
else 'Null')
FROM [testtable]
group by column1,column2 ,column3,
FROM [Query5]
sj
-----Original Message-----
From: Michael Hessler
[mailto:mssqldba-ezmlmshield-x38052917.[Email address protected]
Sent: Wednesday, July 27, 2005 5:23 PM
To: LazyDBA Discussion
Subject: RE: some problem
SELECT
Yes = sum(case when (YN = ' Yes ') then 1 else '' end)
, No = sum(case when (YN = ' No ') then 1 else '' end)
, NULLS = sum(case when YN is NULL then 1 else '' end)
FROM Test_table1
-----Original Message-----
From: Jumma Salim
[mailto:mssqldba-ezmlmshield-x16252917.[Email address protected]
Sent: Wednesday, July 27, 2005 5:14 PM
To: LazyDBA Discussion
Subject: RE: some problem
How do I use count and case statement to figure out 'Yes'; 'No'; and
null
-----Original Message-----
From: Jumma Salim
[mailto:mssqldba-ezmlmshield-x39263952.[Email address protected]
Sent: Wednesday, July 27, 2005 3:12 PM
To: LazyDBA Discussion
Subject: some problem
Hello
I am doing a count for a column which has values 'Y';'N', 'Null'
And other columns for which I use group by column
Is it possible if so how do I displays the info as separate column
sj
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
MS Sql Server LazyDBA home page