I have a table where each row shows a part number and the location of that part in one of three warehouses, A,B or C:
Row 1: PartNo = 1 WHS = A Location = 101
Row 2: PartNo = 1 WHS = B Location = 9A
Row 3: PartNo = 1 WHS = C Location = 34
Row 4: PartNo = 2 WHS = A Location = 17
Row 5: PartNo = 2 WHS = C Location = 33
Row 6: PartNo = 3 WHS = B Location = 17C
Row 7: PartNo = 3 WHS = C Location = 33
What I'd like to do is reformat this so that the data for each part shows up in a single row:
Part WHS A WHS B WHS C
1 101 9A 34
2 17 33
3 17C 33
How can I accomplish this with T_SQL?
Thanks in advance...
Row 1: PartNo = 1 WHS = A Location = 101
Row 2: PartNo = 1 WHS = B Location = 9A
Row 3: PartNo = 1 WHS = C Location = 34
Row 4: PartNo = 2 WHS = A Location = 17
Row 5: PartNo = 2 WHS = C Location = 33
Row 6: PartNo = 3 WHS = B Location = 17C
Row 7: PartNo = 3 WHS = C Location = 33
What I'd like to do is reformat this so that the data for each part shows up in a single row:
Part WHS A WHS B WHS C
1 101 9A 34
2 17 33
3 17C 33
How can I accomplish this with T_SQL?
Thanks in advance...