Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
davidhydro
Starting Member
4 Posts |
Posted - 2014-09-30 : 04:45:54
|
Hi,I have been set a task of updating multiple rows on our companies price list, with several breaks to be a single row with multiple breaks. Currently data layout is this..Item No_ Description Unit Price Minimum Quantity12345 Plastic Pot 0.15 112345 Plastic Pot 0.12 10012345 Plastic Pot 0.10 1000What I would like to achieve is to have one entry for 12345 with the multiple prices and quantities part of the same record like so.. Item No_ Description UP MQ UP MQ UP MQ12345 Plastic Pot 0.15 1 0.12 100 0.10 1000Any assistance is appreciated! |
|
sunder.bugatha
Yak Posting Veteran
66 Posts |
Posted - 2014-09-30 : 06:22:21
|
You can do it using Common Table Expressions CTE. I am unable to paste the code here it is throwing some network error when i try to submitHema Sunder |
|
|
|
|
|