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 |
jmiller121
Starting Member
8 Posts |
Posted - 2008-08-28 : 15:26:20
|
Goal: Take the results of a query and place them all in one line.For exampleField1 Field2T1 M121T1 M123T1 E121T2 L141T2 M141T2 E151T2 E152I need the result of the query to be "T1" (Field1), "M121, M123, E121," (Field2)"In Plain English": Select the Field1 field, and for each value in Field2, take the value, add a comma and a space, then repeat for each additional value - Where the value in Field1 = "T1"In other words, only 1 row returned per unique value in Field1Any ideas??Thanks for your help! |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-08-29 : 09:17:42
|
There are planty of functions here on SQLTeam for CONCATENATION. E 12°55'05.63"N 56°04'39.26" |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-29 : 10:29:01
|
http://www.projectdmx.com/tsql/rowconcatenate.aspx |
 |
|
|
|
|