XTAB - CROSSTAB UTILITY

sp_XTAB (prototype) produces pivoted (crosstab) views/output with a minimum of fuss.No messing with code, just tell XTAB what you want to pivot.Tested to 764 pivoted columns, XTAB can generate up to 63000 characters of dynamic sql. Example (deliberately over-simplified)----------------------updated 27 January 2004Use NorthwindEXEC sp_XTAB 'Northwind','xtEMPL_COUNTRY','Orders','EmployeeID','ShipCountry', '', 'OrderID','COUNT','NULL', '', 'SELECT xtEMPL_COUNTRY.* FROM xtEMPL_COUNTRY' -- Include optional […]

2004-01-24

371 reads

Blogs

I’ll be speaking at SQL Server Virtual Conference from C# Corner

By

I’ll be speaking at the SQL Server Virtual Conference from C# Corner, Friday Jan...

What is a model database?

By

Do you ever take a look at SSMS in the System Databases section? People...

Daily Coping 26 Jan 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs

Forums

How to create a gantt chart for event rooms during a day

By PatrikW

Hi all, This will be my first ever post in a forum like this....

[ODBC Error]

By DBA_007

When backup job runs we are receiving the below error and database connection closes....

Error: The size necessary to buffer the XML content exceeds the buffer quota

By Jim-S

Hi Guys, I have a report named Master and a report named Child, Child...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers