Sunday, March 11, 2012

Export To XMl

can abyone tell me how to export data to xml usng sql server 2000BOOKS ONLINE IS YOUR BEST FRIEND! It comes with Sql Server 2000, and you can d/l a copy of the help docs at microsoft.com/sql

Basic Syntax of the FOR XML Clause
The basic syntax for specifying the XML mode in the FOR clause is:

FOR XML mode [, XMLDATA] [, ELEMENTS][, BINARY BASE64]

Arguments
XML mode

Specifies the XML mode. XML mode determines the shape of the resulting XML.
mode can be RAW, AUTO, or EXPLICIT.

XMLDATA

Specifies that an XML-Data schema should be returned. The schema is prepended to the document as an inline schema.

ELEMENTS

If the ELEMENTS option is specified, the columns are returned as subelements. Otherwise, they are mapped to XML attributes. This option is supported in AUTO mode only.

BINARY BASE64

If the BINARY Base64 option is specified, any binary data returned by the query is represented in base64-encoded format. To retrieve binary data using RAW and EXPLICIT mode, this option must be specified. In AUTO mode, binary data is returned as a reference by default.|||Also check out this post:view post 471827

Terri

No comments:

Post a Comment