staleb
asked on
Showing multiple group values in one row
Hi how can I show multiple vaules in the same group row
(not sure if this is the right way to say it)
example
table( PalletNo, box weight, count)
Values
19,10,1
19,20,1
19,20,1
19,20,1
How do I querie this so that it will display
Pallet, boxes, sum(count)
19, 20x3 10x1, 4
(not sure if this is the right way to say it)
example
table( PalletNo, box weight, count)
Values
19,10,1
19,20,1
19,20,1
19,20,1
How do I querie this so that it will display
Pallet, boxes, sum(count)
19, 20x3 10x1, 4
ASKER
This gave me 3 rows.
Can these three lines be combined into one?
Can these three lines be combined into one?
ASKER
think I may have solved it with stuff function
What is your SQL Server version?
ASKER
SQL 2012
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes that worked perfect.
Also made it work with a stuff command
Tnx
Also made it work with a stuff command
Tnx
Please try the following:
Open in new window