Monday, February 27, 2012

SQL server - export xml to file

sp_makewebtask @outputfile = 'c:\temp\myxmlfile.xml',
    @query = 'SELECT ( SELECT  location AS loc,ChangeFreq AS changefreq,Priority AS priority from posterdata_sitemap FOR XML PATH(''url''),TYPE)', 
    @templatefile = 'c:\temp\template.tpl'



/*
EXEC master.dbo.sp_configure 'show advanced options', 1
RECONFIGURE
sp_configure 'Web Assistant Procedures', 1
RECONFIGURE */

No comments:

Post a Comment