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 |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-01-17 : 20:50:27
|
Louis writes "Thought I share this snippet. You can "concatenate" over rows, using the update statement. The result rows are: ROW1 [C,], ROW2 [B,C], ROW3 [A,B,C].create table #me (text varchar(1),notes varchar(100))insert into #meselect text='A',notes=' 'UNIONselect text='B',notes=' 'UNIONselect text='C',notes=' 'declare @text varchar(1000)select @text = nullupdate #meset @text = notes = text +','+ isnull(@text,'')select * from #me" |
|
|
|
|