Developer

SQL Question: When the Pivot data contains a Key Column (and character data at that!)

I recently wrote about pivoting (or is it unpivoting?) some data. A new wrinkle has been added.


Let's say that the data now looks like this:


INSERT INTO X ( FIELD1 ) VALUES ( 'row1,1,2');

INSERT INTO X ( FIELD1 ) VALUES ( 'row2,2,3');

INSERT INTO X ( FIELD1 ) VALUES ( 'row3,4,5,6');

This post originally appeared on an external website

Editor's Picks