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 |
sridhar3004
Starting Member
34 Posts |
Posted - 2012-02-02 : 02:13:06
|
I've the following dataOrder tableOrderNo Item Qty1 A 41 B 31 C 22 A 22 C 2OrderSize BreakupOrderNo Item Size Qty1 B M 11 B L 11 B XL 11 C XL 22 C L 12 C M 1Please note that not all items will have the size attribute to it. In the above example items B & C have sizes. Hence they are present in the ordersizebreakup table.The output should be in the following format. The items should appear as columns along with their sizesOrderNo A B-S B-M B-L B-XL C-S C-M C-L C-XL1 4 0 1 1 1 0 0 0 22 2 0 0 0 0 0 1 1 0Any help is appreciatedThanksSridhar |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-02 : 11:42:29
|
do you've a master table for storing size values? without which how do you list other sizes like S. i can not even see them on OrderSize table------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|