Click here to Skip to main content
15,915,611 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table like this and i want to convert it in such a way that the operations with same opration type,Machine and attatchment should concatenate ad their SAM will be added:
C#
Oprn_ID	Operation_Type	Operation_Name	Machine_Type	Attatchment	SAM
1	Bottom Fold	A	SNLS	NO	1.2
2	Baby Overlock	B	5TOLK	NO	0.8
3	Gathering	C	SNLS	1/16 Folder	0.6
4	Panel Attach	D	SNLS	NO	0.9
5	Panel Attach	E	SNLS	NO	0.5
6	Overlock	F	5TOLK	NO	0.7
7	Pin Stitch	G	SNLS	NO	0.9
8	Elastic Finish	H	SNLS	1/16 folder	0.85
9	Bottom Fold	I	SNLS	NO	0.42
10	Gathering	J	SNLS	1/16 Folder	0.78
11	Panel Attach	K	SNLS	NO	0.56
12	Attachment	L	SNLS	NO	0.14
13	Elastic Finish	M	SNLS	NO	0.96
14	Overlock	N	5TOLK	NO	0.76









like this

C#
Operation_Type	Operation_Name	Machine_Type	Attatchment	SAM
Bottom Fold	A + I	SNLS	NO	1.62
Gathering	C + J	SNLS	1/16 Folder	1.38
Baby Overlock	B	5TOLK	NO	0.8
Panel Attach	D + E + K	SNLS	NO	1.96
Overlock	F + N	5TOLK	NO	1.46
Pin Stitch	G	SNLS	NO	0.9
Elastic Finish	H	SNLS	1/16 folder	0.85
Attachment	L	SNLS	NO	0.14
Elastic Finish	M	SNLS	NO	0.96


What I have tried:

I dont have any idea to do this
Posted
Updated 3-May-16 11:15am
v2

1 solution

use & between the column in your select statement
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900