Asked By SnapDive
25-Dec-09 08:58 PM
SQL Server 2000. I have the following table and need to turn it into
something "flatter". Gurus, can you help me come up with any SQL
2000-compliant TSQL that can make this happen?
I have this:
CREATE TABLE #Pairs
(
RowId Integer,
ItemKey VARCHAR(50),
ItemValue VARCHAR(50),
ItemType VARCHAR(50),
ItemDesc VARCHAR(50)
);
INSERT INTO #Pairs VALUES(1,'Height','84','Int','Height of the Door');
INSERT INTO #Pairs VALUES(2,'Width','40','Int','Widtrh of the door.');
INSERT INTO #Pairs VALUES(3,'Thickness','2','Int','Thickness of the
door.');
INSERT INTO #Pairs VALUES(4,'Color','White','VarChar(50)','Color of
the door.');
But I need to turn it into a table that looks like this:
RowId Height Width Thickness Color
1 84 null null null
2 null 40 null null
3 null null 2 null
4 null null null White
Thanks and Merry Christmas!