Doing a crosstab query in SQL 6.5

Doing a crosstab query in SQL 6.5

Post by leevd.. » Tue, 19 Sep 2000 04:00:00



Can someone tell me how to do a crosstab query in SQL 6.5.

I have a record set of totals as follows:
A    65
b    75
c    85
d    95

I want to display them as follows is a single record:
        A   B   C   D
Totals  65  75  85  95

If anyone can point me in a direction on how to create a cross tab or
has a stored procedure to perform a crosstab it would be greatly
appreciated.

Thanks!
Lee

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Doing a crosstab query in SQL 6.5

Post by Neil Pik » Wed, 20 Sep 2000 04:00:00


See the crosstab FAQ entry

 Neil Pike MVP/MCSE.  Protech Computing Ltd
 Reply here - no email
 SQL FAQ (484 entries) see
 http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
 (faqxxx.zip in lib 7)
 or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
 or www.sqlserverfaq.com
 or www.mssqlserver.com/faq

 
 
 

Doing a crosstab query in SQL 6.5

Post by leevd.. » Wed, 20 Sep 2000 04:00:00




> See the crosstab FAQ entry

>  Neil Pike MVP/MCSE.  Protech Computing Ltd
>  Reply here - no email
>  SQL FAQ (484 entries) see
>  http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
>  (faqxxx.zip in lib 7)
>  or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
>  or www.sqlserverfaq.com
>  or www.mssqlserver.com/faq

Thanks for the reference Neil, I'll check it out!

Sent via Deja.com http://www.deja.com/
Before you buy.