Bert De Haes
Hall of Fame
Points: 3098
More actions
January 24, 2005 at 1:53 am
#74847
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
Kenneth Wilhelmsson
SSC-Dedicated
Points: 30043
January 24, 2005 at 3:31 am
#538702
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
sqlemail@yahoo.com
SSC Eights!
Points: 919
January 25, 2005 at 10:41 am
#539005
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