Thursday, March 29, 2012

How redirect SQL Sserver XML output?

I have to generate an XMl from a SQL Server 2000 table. Using the clause FOR
XML i can only send the result to screen or to file.
I want, instead, store the result, into a field column in another table.
There's a way i can do it without passing through a file (and OpenXML), but
storing the result directly into the field column?
tnks in advance
andrea
Do you want to say something along the line of
insert into T(xmlcol) values (select ... for xml ...)
?
If so, you will need to wait for SQL Server 2005. In SQL Server 2000, you
had to do some really ugly workarounds by moving the XML to the client and
then reload it back into the server.
Best regards
Michael
"vikys" <vikys@.hotmail.com> wrote in message
news:utcDmwwcFHA.3712@.TK2MSFTNGP09.phx.gbl...
>I have to generate an XMl from a SQL Server 2000 table. Using the clause
>FOR
> XML i can only send the result to screen or to file.
> I want, instead, store the result, into a field column in another table.
> There's a way i can do it without passing through a file (and OpenXML),
> but
> storing the result directly into the field column?
> tnks in advance
> andrea
>

No comments:

Post a Comment