|
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 requirementsTo 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 -
- SELECT *
- FROM T009_SALES_ORDER_DETAIL
- FOR XML RAW('SalesOrderDetail'),ROOT('SalesOrder'),ELEMENTS
Copy code
|