Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to create a Cross Tab Query in SQL Server

Author  Topic 

itmasterw
Yak Posting Veteran

90 Posts

Posted - 2005-05-20 : 16:30:52
In Access you can create a Cross tab query, which is basically a Pivot table in Excel. This si the code that Access generates fro one of my queries:

TRANSFORM Sum([Summary 3].[ESC ADV BAL]) AS [The Value]" & _
"SELECT [Summary 3].[INV GROUP3], Sum([Summary 3].[ESC ADV BAL]) AS [Total Of ESC ADV BAL]" & _
"From [Summary 3] GROUP BY [Summary 3].[INV GROUP3] PIVOT [Summary 3].[ESCROW DLQ STATUS]

Obviously they use special key words like "Transform" and "Pivot" that you cannot use in standard SQL.
I was wondering how I can I create a Cross tab query in SQL Sever.

Thank You
ITM


ITM

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-05-20 : 16:43:55
Whole bunch of stuff here ...

http://weblogs.sqlteam.com/jeffs/archive/2005/05.aspx

- Jeff
Go to Top of Page
   

- Advertisement -