|
Posted by imani_technology_spam@yahoo.com on 12/05/05 21:27
I have the following table;
CREATE TABLE [x_Note] (
[x_NoteId] [int] IDENTITY (1, 1) NOT NULL ,
[Note] [varchar] (7200) COLLATE SQL_Latin1_General_Pref_CP1_CI_AS NOT
NULL ,
CONSTRAINT [PK_x_NoteId] PRIMARY KEY CLUSTERED
(
[x_NoteId],
) WITH FILLFACTOR = 90 ON [USERDATA] ,
) ON [USERDATA]
GO
My clients want me to take the contents of the Note column for each row
and combine them. In other words, they basically want:
Note = Note [accumulated from previous rows] + Char(13) [because they
want a carriage return] + Note [from current record].
What is the most efficient and relatively painless way to do this? I
think it might require a cursor, but I'm not sure if there is a more
elegant set-based method to make this happen.
[Back to original message]
|