• Not sure what's not working for you.

    I just tried this, and it worked:

    create proc dbo.XMLTest

    as

    set nocount on;

    select *

    from dbo.Numbers

    for XML raw, type;

    go

    create table #T (

    ID int identity primary key,

    XMLVal XML);

    insert into #T (XMLVal)

    exec dbo.XMLTest;

    go

    drop proc dbo.XMLTest

    go

    select *

    from #T;

    drop table #T;

    Can you provide the code that's not working for you? Might be able to see what's wrong with it.

    - 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