• Just figured this out to some degree. If you code:

    if object_id('tempdb.dbo.#tmp') is not null drop table dbo.#tmp;

    create table dbo.#tmp(x xml);

    insert dbo.#tmp

    select 1 [Number] for xml path('root')

    it will fail with Msg 6819, however, the following will work!?!

    if object_id('tempdb.dbo.#tmp') is not null drop table dbo.#tmp;

    create table dbo.#tmp(x xml);

    insert dbo.#tmp

    select (select 1 [Number] for xml path('root'))



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.