Thanks allot Tom, That works GREAT!!!
==============================
[quoted text, click to view] "Tom Moreau" <tom@dont.spam.me.cips.ca> wrote in message
news:%23Ugv7hPsHHA.500@TK2MSFTNGP02.phx.gbl...
This will work in both SQL 2000 and SQL 2005:
select
sum (case when num1 = 'Adult' then 1 else 0 end) Adult
, sum (case when num1 = 'Minor' then 1 else 0 end) Minor
from
tbl
--
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
[quoted text, click to view] "WANNABE" <SameAsB4> wrote in message
news:Osoa$bIsHHA.1864@TK2MSFTNGP04.phx.gbl...
How can I convert the results of this query
SELECT num1, COUNT(num1) Total
FROM tbl
GROUP BY num1
Which displays like this
Adult 2
Minor 2
BUT I WANT IT TO DISPLAY LIKE
Adult Minor
2 2
Can this be done and how?? I've looked at the new PIVOT, and I am using
2005,
but I don't understand what I've read and there's not much I can find to
read.
Thanks.