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 |
|
joriveek
Starting Member
33 Posts |
Posted - 2007-02-08 : 05:06:56
|
| Hi,I have data as follows:1 A 101 B 4 1 C 22 A 152 B 5I want to display the data as follows:1 A 10 B 4 C 22 A 15 B 5oreven like1 10 4 22 15 5Group them up the first column to avoid the repeations and give the result in one single line, Is this possible?Thanks J |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-02-08 : 05:12:43
|
| SELECT DISTINCT Col1, dbo.fnConcat(Col1)FROM YourTableThe Concat function exists in many variations. Please feel free to do a search on this site.Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|