• Try this, see if it helps:

    if object_id(N'tempdb..#T') is not null

    drop table #T;

    create table #T (

    ID int identity primary key,

    Col1 char(1) not null);

    insert into #T (Col1)

    select substring('abcdefghijklmnopqrstuvwxyz', number, 1)

    from dbo.Numbers

    where number between 1 and 26;

    select Col1

    from #T

    for XML path;

    select Col1

    from #T

    for XML path('');

    select ', ' + Col1

    from #T

    for XML path;

    select ', ' + Col1

    from #T

    for XML path('');

    You'll see that the comma gets rid of the Col1 header, and the ('') gets rid of the row header, so all you're left with is the value and the comma.

    Try some variations on it. Put an "a" in there instead of a comma, or a vertical-pipe instead of a comma. Basically, anything that would result in "(no column name)" if you ran it as a regular query will accomplish what the comma does there.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon