• Why to go hard way?

    No need to Add column ColRowNo and update it.

    I would go like this;

    ---------------------------------------------------------------------

    -- Create Table and Insert data

    ---------------------------------------------------------------------

    Create Table TestTable (RowID Int Identity(1, 1), Col1 int, Col2 char(3))

    Insert TestTable Values (1, 'ABC')

    Insert TestTable Values (1, 'DEF')

    Insert TestTable Values (1, 'GHI')

    Insert TestTable Values (2, 'JKL')

    Insert TestTable Values (2, 'MNO')

    Insert TestTable Values (3, 'PQR')

    Insert TestTable Values (3, 'STU')

    select * from TestTable

    ---------------------------------------------------------------------

    -- Add TestTable column and Insert Row Number

    ---------------------------------------------------------------------

    Select Distinct Col1, (Stuff((Select ',' + Col2 from TestTable where Col1 = a.Col1 for XML Path('')),1,1,''))

    from TestTable a

    Drop Table TestTable

    GO

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]