How do SQL server 2000 and XML linked?

Answer Posted / hcl

Its linked in so many ways..To generate the output in xml
format to load the XML data into SQL Server tables.

To generate the XML data using select statement can have ,
"for XML {RAW/AUTO/EXPLICIT)" option added in the last of
sql server >=2000 (not possible in <2000).



example is

use Northwind

select * from orders where orderID in (10248, 10249) for
xml auto

Result:

<orders OrderID="10248" CustomerID="VINET" EmployeeID="5"
OrderDate="1996-07-04T00:00:00"
RequiredDate="1996-08-01T00:00:00"
ShippedDate="1996-07-16T00:00:00" ShipVia="3"
Freight="32.3800" ShipName="Vins et alcools Chevalier"
ShipAddress="59 rue de l&apos;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain syntax for disabling triggers?

758


Define clusters?

846


How to connect a database with sql express.?

792


What is use of attribute hierarchy ordered ? : sql server analysis services, ssas

790


What is reference section?

718


What is the purpose of the tempdb database?

799


what are the steps you will take to improve performance of a poor performing query? : Sql server database administration

745


Can I save my report as html, excel or word? : sql server management studio

756


What is open database communication (odbc)?

791


Is it possible to create trigger on views?

750


Is it possible to run multiple publications and different type of publications from the same distribution database? : sql server replication

769


Explain what are commit and rollback in sql?

709


How to create a store procedure with encryption?

748


How you can get the list of largest tables in a database?

724


Why you need indexing? Where that is stored and what you mean by schema object? For what purpose we are using view?

710