January 11, 2011 at 6:00 am
I've a data in the following format....
VehicleID CarName VendorName Quantity Price
1 Honda Smith 20 25000
1 Honda Ross 30 20000
1 Honda Nick 40 10000
1 Nissan Steve 25 24000
1 Nissan Bruce 15 18000
1 Nissan Sean 20 40000
2 Honda Kate 30 90000
2 Honda Ricky 40 20000
2 Honda Shaun 10 15000
I'd like to convert the above data into following format....
VehicleID CarName Vendor1 Quantity1 Price1 Vendor2 Quantity2 Rate2 Vendor3 Quantity3
1 Honda Smith 20 25000 Ross 30 20000 Nick 10000
1 Nissan Steve 25 24000 Bruce 15 18000 Sean 40000
2 Honda Kate 30 90000 Ricky 40 20000 Shaun 15000
Pls Note: 1. One VehicleID can have any number of CarName.
2. There can be any number of VehicleID.
3. But One CarName can have maximum upto only 3 Vendors.
How can I achieve this???
Kindly Help..!!!!
Thanks in advance:-):-)
January 11, 2011 at 7:36 am
Double post. No posts here, please. Please refer to the other post at the following URL:
http://www.sqlservercentral.com/Forums/Topic1045849-391-1.aspx
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply