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 |
|
geossl
Yak Posting Veteran
85 Posts |
Posted - 2004-01-07 : 02:21:37
|
| Dear All, There is a tableID Name---- -----1 Peter2 Mary3 PauLI would like to get all these three records and return in a single field, that is, PeterMaryPaulIs it possible to do with SQL?Thanks. |
|
|
raymondpeacock
Constraint Violating Yak Guru
367 Posts |
Posted - 2004-01-07 : 04:45:28
|
| Try thisDECLARE @Result VARCHAR(1000)SELECT @Result = COALESCE(@Result + name, name) FROM TableNameSELECT @ResultRaymond |
 |
|
|
|
|
|