Technical Article

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 […]

You rated this post out of 5. Change rating

2004-01-24

387 reads

Blogs

How To Restore Change Data Capture – CDC Tables When Restoring a SQL Server Database

By

I have recently had the privilege of working with multiple clients who have been...

KDA: Echoes of Deception - Onboarding

By

I’ll walk through the KDA UI and tackle the first challenge before diving into...

Kusto Detective Agency - Intro

By

While I mostly write about SQL Server, I have a soft spot for Kusto....

Read the latest Blogs

Forums

Meta AI by Facebook: A New Contender in the AI Battle

By Daniel Calbimonte

Comments posted to this topic are about the item Meta AI by Facebook: A...

Is SQL Server Feature Complete?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Is SQL Server Feature Complete?

The Monitor Server

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Monitor Server

Visit the forum

Question of the Day

The Monitor Server

What does the monitor server do in log shipping?

See possible answers