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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Concatenating Strings from a single column

Author  Topic 

rlopez
Starting Member

18 Posts

Posted - 2006-08-22 : 12:52:14
Does anyone know the simplest way to concatenate a string from a single column when using a GROUP BY.

For example

Student# StudentStatement
101 The student said that they enjoyed
101 the class very much.
102 The student did not like the class
102 at all.

I would like to return a result of:

Student# StudentStatement
101 The student said that they enjoyed the class very much.
102 The student did not like the class at all.

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-08-22 : 13:00:13
http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx

Srinika
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-08-26 : 05:22:02
Note that if concatenated string exceeds 8000 characters, you will have problem. If you use front end application, you can concatenate there also



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -