Pivoting data in a data table

PaulC100

New member
Joined
Jul 29, 2004
Messages
2
Programming Experience
3-5
Hi,

Can someone point me in the right direction, i Have the following data coming from a database

Primary key - Product Slot - Product Name
1 ------------ A ------------- HP Laptop
2 ------------ B ------------- Windows XP
3 ------------ C ------------- Printer 1
4 ------------ C ------------- Printer 2
5 ------------ C ------------- Printer 3

From this I need to generate the following datatable

Slot A ----- Slot B ------- Slot C
HP Laptop - Windows XP - Printer 1
HP Laptop - Windows XP - Printer 2
HP Laptop - Windows XP - Printer 3

So I basically need to find any lines that fill a slot more than once, and return a row for each of these different options.

Any ideas where i'd start? It needs to be done in my VB.NET business layer (Can't alter the DB)

Thanks
Paul
 
Back
Top