bangalibhai
Programmer
Hi,
Is it possible to do the following by writing a SQL query.....
Beginning Table
Col1 Col2 Col3
=====================
2001 2378 212
2001 2378 213
2001 3019 218
2001 3019 236
2001 3019 220
2001 4112 239
2001 4112 231
2002 921 214
2002 1315 227
2002 1315 26
2002 2774 226
2002 2774 223
2002 2774 225
2003 4128 214
2003 4450 237
2003 4450 212
2003 4450 213
2003 4450 235
Resulting Table:
Col1 Col2 Col3
=====================
2001 2378 212,213
2001 3019 218,236,220
2001 4112 239,231
2002 921 214
2002 1315 227,26
2002 2774 226,223,225
2003 4128 214
2003 4450 237,212,213,235
Basically I am trying to GROUP BY Col1 AND Col2 and place the data of respective Col3 all together. I am developing this in MS SQL Server.
Your help is greatly appreciated.
Thanks,
Nihad
Is it possible to do the following by writing a SQL query.....
Beginning Table
Col1 Col2 Col3
=====================
2001 2378 212
2001 2378 213
2001 3019 218
2001 3019 236
2001 3019 220
2001 4112 239
2001 4112 231
2002 921 214
2002 1315 227
2002 1315 26
2002 2774 226
2002 2774 223
2002 2774 225
2003 4128 214
2003 4450 237
2003 4450 212
2003 4450 213
2003 4450 235
Resulting Table:
Col1 Col2 Col3
=====================
2001 2378 212,213
2001 3019 218,236,220
2001 4112 239,231
2002 921 214
2002 1315 227,26
2002 2774 226,223,225
2003 4128 214
2003 4450 237,212,213,235
Basically I am trying to GROUP BY Col1 AND Col2 and place the data of respective Col3 all together. I am developing this in MS SQL Server.
Your help is greatly appreciated.
Thanks,
Nihad