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 |
|
refreeman4
Starting Member
6 Posts |
Posted - 2002-04-11 : 16:55:07
|
| I have a temptable in a procedure that is derived from a query on 2 other tables. For simplicity it is composed of a field that contains the original table GUID and a varchar field. In the temptable there are several records with the same GUID but unique varchar data. I need to somehow group by GUID and produce a single record that contains the GUID field and a varchar field that has ALL of the temptable varchars separated by a comma.extemptableGUID DATAx111 thisx111 isx111 ax111 testx222 ofx222 myx222 patiencegroupedtableGUID DATAx111 this,is,a,testx222 of,my,patienceAny ideas? Do I need to somehow loop through the temptable or can it be done in a query?Thanks for your help. |
|
|
yakoo
Constraint Violating Yak Guru
312 Posts |
Posted - 2002-04-11 : 20:50:56
|
| Do a search in the forum and articles for CSV.I think this topic has come up plenty of times, and the solution is in here somewhere.Got SQL? |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
|
|
refreeman4
Starting Member
6 Posts |
Posted - 2002-04-11 : 23:24:41
|
| Perfect. Thanks guys. |
 |
|
|
|
|
|