Aug 23, 2011 #1 ciarra41 Technical User Sep 11, 2006 116 US old table: idnum values 5548 2s1dd 5548 35dd6 5548 4548p 5584 22de1 New table or sql: idnum value1 value2 value3 value4 5548 2s1dd 35dd6 4548p 22de1
old table: idnum values 5548 2s1dd 5548 35dd6 5548 4548p 5584 22de1 New table or sql: idnum value1 value2 value3 value4 5548 2s1dd 35dd6 4548p 22de1
Aug 24, 2011 #2 Alan0568 Technical User May 24, 2006 77 GB SELECT * FROM (SELECT idnum,value FROM old_table) x PIVOT (min(value) FOR value IN ([1],[2],[3],[4])) y just extend the 1,2,3,4 to cater for how many there could be. Upvote 0 Downvote
SELECT * FROM (SELECT idnum,value FROM old_table) x PIVOT (min(value) FOR value IN ([1],[2],[3],[4])) y just extend the 1,2,3,4 to cater for how many there could be.