storing the result of a select .. for XML into a SQL table

  • Hi,

    I want to store the result of a "select * for XML" into a table. I managed to do this using bcp queryout and bulk insert, but there should be an other way to do this ?

    Example :

    how to store the result of

    select *

    from pubs.dbo.authors

    for XML AUTO

    into the table

    create table XMLtst ( XML text null )

     

    Thanks

  • It seems that when trying to insert into a table, you get the message 'Server: Msg 6819, Level 16, State 1, Line 4

    The FOR XML clause is not allowed in a INSERT statement.'

    Apparently your way is the way..

    /Kenneth

  • I believe this feature is not available in SQL 2000.


    paul

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply