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

373 reads

Blogs

Updated Pluralsight Course – Kubernetes Installation and Configuration Fundamentals

By

My updated course “Kubernetes Installation and Configuration Fundamentals” in now available on Pluralsight here! If you want...

Power BI and a Star Schema

By

I sometimes get asked from customers if they should use a star schema or...

A New Git Default Branch

By

I learned a new trick from Andrew Pruski. In a blog on avoiding PowerPoint,...

Read the latest Blogs

Forums

Name of the remote server in a query

By Ram

Hi, I want to retrieve the name of the remote server in my SQL...

How to Update field updatedStuffDiff when i have different values for parts exis

By ahmed_elbarbary.2010

I work on sql server 2012 I face issue I can't update column name...

poor query performance by joining large table and new CE

By tdo

We have a complex stored procedure working in our database. Some of the statements...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers