This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12239|Reply: 0

[Source] XML generated using the SQL statement for xml

[Copy link]
Posted on 6/11/2015 11:28:58 AM | | | |
SSIS does not directly provide conversion output from data source to XML, Destination output objects include Excel File, Flat File, Database, etc., but it does not directly provide XML file output configuration.
But we can still do it through the following methods:
Method 1: Convert the output to a Flat File-to-String XML in the datastream
Method 2: Use scrip to remove the task output XML file in the control flow
Description of requirements
To convert the result of this query to XML -
Format that needs to be output as an XML file -
Then first of all, you need to convert the format in the SQL statement, and you can wrap the query result into the corresponding XML format -

  1. SELECT *
  2. FROM T009_SALES_ORDER_DETAIL  
  3. FOR XML RAW('SalesOrderDetail'),ROOT('SalesOrder'),ELEMENTS
Copy code






Previous:asp.net modify the LINQ app.config configuration file to web.config
Next:vs The C# development toolbox is empty or missing a control workaround
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com