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 |
|
lane0618
Posting Yak Master
134 Posts |
Posted - 2004-06-16 : 19:51:51
|
| I have the following table:item--desc1---desc2123-1,A,C123-2,B,A345-1,A,D345-2,A,AI want to end up with:item--desc1---desc2123,(AB),(CA)345,(A),(CAD)so that 123-1 and 123-2 are grouped together and all the values in the desc1 and desc2 field are consolidated into one field. Hope that makes sense. Thanks! |
|
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2004-06-16 : 20:00:15
|
| Is there any limit to the number of 'descriptions' per item?Also - how do you get (A),(CAD) from A,D and A,A? |
 |
|
|
lane0618
Posting Yak Master
134 Posts |
Posted - 2004-06-16 : 20:11:48
|
| Oops, should be:item--desc1---desc2123,(AB),(CA)345,(A),(DA)So for example, If I look just at item and desc1 for 123-1 and 123-2 which are grouped into 123, it looks like this:item--desc1123-1,A123-2,Bequals:item--desc1Total123,(AB)So 123 has a consoldated desc1 of A+B (or formatted like (AB))Once again, hope this makes some sense... |
 |
|
|
|
|
|
|
|