Monday, March 26, 2012

export data from sql2005 table to xml file

hi, how can i export data from a xml field of a table directly to a xml
file?thanks
Hi,
SQL server support export a database to various format but not a field of a
table..
I don't think that there is a built-in machanism in SQL serve 2005 for you
to do this.. but you can write a simple program to do exactly what you need
Nirosh.
"Daniel Vakil" <DanielVakil@.discussions.microsoft.com> wrote in message
news:0BB5EB86-3966-4A49-B11C-F81826E54D28@.microsoft.com...
> hi, how can i export data from a xml field of a table directly to a xml
> file?thanks
|||what i meant is to export the content of a xml field that contains a xml
formated string. i need to create a xml file for further use. is it a sql
program that you suggest ? can you give an example or redirect me to a URL ?
"Nirosh" wrote:

> Hi,
> SQL server support export a database to various format but not a field of a
> table..
> I don't think that there is a built-in machanism in SQL serve 2005 for you
> to do this.. but you can write a simple program to do exactly what you need
> Nirosh.
> "Daniel Vakil" <DanielVakil@.discussions.microsoft.com> wrote in message
> news:0BB5EB86-3966-4A49-B11C-F81826E54D28@.microsoft.com...
>
>
|||The easiest way is to run the query in SQL Server Management Studio using
the Grid view, click on the link of the XML document and use save as.
Otherwise, you will need to write a simple client application or CLR UDF to
write the data to a file. SQL Server 2005 has no export a content of a
single cell to file.
Best regards
Michael
"Daniel Vakil" <DanielVakil@.discussions.microsoft.com> wrote in message
news:F8AF1C80-2E0D-4391-9663-4E235ACBCE93@.microsoft.com...[vbcol=seagreen]
> what i meant is to export the content of a xml field that contains a xml
> formated string. i need to create a xml file for further use. is it a sql
> program that you suggest ? can you give an example or redirect me to a URL
> ?
> "Nirosh" wrote:
|||thanks but
this has to be done automaticly. some job detects incidents in the data and
send a xml file to manager. in sql2000 i've done it with xml sentence and
then DTS the field to the xml file.
"Michael Rys [MSFT]" wrote:

> The easiest way is to run the query in SQL Server Management Studio using
> the Grid view, click on the link of the XML document and use save as.
> Otherwise, you will need to write a simple client application or CLR UDF to
> write the data to a file. SQL Server 2005 has no export a content of a
> single cell to file.
> Best regards
> Michael
> "Daniel Vakil" <DanielVakil@.discussions.microsoft.com> wrote in message
> news:F8AF1C80-2E0D-4391-9663-4E235ACBCE93@.microsoft.com...
>
>
sql

No comments:

Post a Comment