Hi,My problem is that I need to search through a table and concatenate text columns from various rows. I am running into a problem declaring the correct amount of varchars and of breaking the text up into the variables. I thought I saw an article here on this, but now can't find it. Here is the structure and some sample data. CREATE TABLE [Comments] ( [CO] [tinyint] NOT NULL , [CLAIM_NO] [int] NOT NULL , [COM_TYPE] [tinyint] NOT NULL , [SEQ] [int] NOT NULL , [COMMENT] [text] NULL , [TRANS_DATE] [datetime] NULL , [USERID] [varchar] (15) NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]GOinsert commentsselect 1, 12345, 1, 1, 'This is the first comment in this set', getdate(), 'surefooted' union allselect 1, 12345, 1, 2, 'This is the second comment in this set', getdate(), 'surefooted' union allselect 1, 12345, 1, 3, 'This is the third comment in this set', getdate(), 'surefooted' union allselect 1, 12345, 1, 4, 'This is the fourth comment in this set', getdate(), 'surefooted' union allselect 1, 12345, 1, 5, 'This is the fifth comment in this set', getdate(), 'surefooted' union allselect 1, 12345, 2, 1, 'This is the first of the next comment in this set', getdate(), 'surefooted' union allselect 1, 12345, 2, 2, 'This is the second of the next comment in this set', getdate(), 'surefooted' union allselect 1, 12345, 2, 3, 'This is the third of the next comment in this set', getdate(), 'surefooted' union allselect 1, 12345, 2, 4, 'This is the fourth of the next comment in this set', getdate(), 'surefooted' union allselect 1, 12345, 2, 1, 'This is the first of the third comment in this set', getdate(), 'surefooted' union allselect 1, 12345, 2, 2, 'This is the second of the third comment in this set', getdate(), 'surefooted'
This is what I need to get :[code]1 12345 1 This is the first comment in this set This is the second comment in this set This is the third comment in this set This is the fourth comment in this set This is the fifth comment in this set 2005-01-21 15:46:18.100 surefooted[code]All as one row. Please help if you can, thanks in advanced.-JonShould still be a "Starting Member"
.