Question : Display rows as columns

This is SQL 2000 I have the data below. But now, I want to display the company as columns. I thought UNION would do it but it didnt. Any ideas:

Basically, display the company as columns with cnt for each reason ..
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
Reason          Company      Cnt
CORPT - B2B			CSQ_NBW	  2
CORPT - B2B 		CSQ_WARR  1
CORPT - Member 		CSQ_PF	  1
CORPT - Sponsor 	CSQ_NBW	  2
CORPT - Store		CSQ_JNB	  4
CORPT - Store		CSQ_NBW	  12
CORPT - Team		CSQ_NBW	   1
FBACK - Free Gift 	CSQ_NBW	   1
FBACK - Needed		CSQ_JNB	   8
FBACK - Needed		CSQ_NBW	   32
FBACK - Needed		CSQ_U	    1
FBACK - Needed		CSQ_WARR	1

I want to display it as this:

Reason        CSQ_NBW    CSQ_WARR  CSQ_OF   CSQ_JNB   CSQ_U

CORPT - B2B     2          1         
CORPT - Member                       1
CORPT - Sponsor  2
CORPT - Store    12                               4

etc..

Answer : Display rows as columns

select Reason,
  sum(case when Company='CSQ_NBW'  then Cnt end) CSQ_NBW,
  sum(case when Company='CSQ_WARR' then Cnt end) CSQ_WARR,
  sum(case when Company='CSQ_OF'   then Cnt end) CSQ_OF,
  sum(case when Company='CSQ_JNB'  then Cnt end) CSQ_JNB,
  sum(case when Company='CSQ_U'    then Cnt end) CSQ_U
from tbl
group by Reason
Random Solutions  
 
programming4us programming4us