5 pts.
 Creating XML file using SQL Server 2005
How to create a xml file using sql server 2005? what are all the steps to do for this?

Software/Hardware used:
ASKED: October 8, 2008  4:54 AM
UPDATED: October 9, 2008  6:14 AM

Answer Wiki:
Create a stored procedure which contains the select statement you wish to use. Make sure that the select statements creates the XML data the way you want it using the FOR XML clause. Then use BCP and use it to run the stored procedure using the QUERYOUT switch giving to the three part name to the stored procedure as well as the path to the file you wish to put the data into. You can also do this with DTS (SQL 2000 and older) or SSIS (SQL 2005 and newer).
Last Wiki Answer Submitted:  October 9, 2008  6:14 am  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Denny Cherry has over a decade of experience managing SQL Server and is currently a Sr. Database Administrator and Architect at Awareness Technologies. Denny holds several Microsoft Certifications as well as being a Microsoft MVP.

 64,520 pts.