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 |
|
adas40
Starting Member
2 Posts |
Posted - 2005-08-11 : 15:05:45
|
| ID Topic59 C++59 Java60 VB61 NULL78 SQL78 PerlNow I want it to look like:ID Topic59 C++, Java60 VB61 NULL78 SQL, PerlPlease help. Thanks. |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
|
|
adas40
Starting Member
2 Posts |
Posted - 2005-08-11 : 15:14:40
|
| Yes I saw that post but still have trouble. The result I got with that post is this.ID Topic59,59,60,61,78,78 C++,JAVA,VB.......Which is not what I want?Thanks |
 |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2005-08-11 : 15:32:33
|
| What about doing something like...SELECT [ID], @TopicList = COALESCE(@TopicList + ', ', '') + CAST(Topic AS varchar(5))FROM YourTableGROUP BY [ID]---------------------------EmeraldCityDomains.com |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|