Click here to Skip to main content
12,828,983 members (35,481 online)
Rate this:
Please Sign up or sign in to vote.
See more: SSIS
Hi.. I am new in SSIS
I want to create SSIS application that retrieve data from 2 different tables(2 separate select query ) and write it to xml file
How can I implement it using ssis application?
Posted 18-Feb-13 10:50am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I am not sure if you're familiar with C# and I don't know if you want combine the results of the seperate queries before writting to xml; I will assume you will write them seperately.

step 1: drag "Execute SQL Task" in the tool box to the design
change it's properties as follows:
a. Set resultset property to xml
b. provide database connection
c. provide first sql statement that returns query reslut
d. On the resultset tab on your left corner provide a variable name to which result will be written to(you should create the variable earlier the project

Make sure your query Parsed correctly.

step 2: drag a script task and connect it to the Object above.
And then do the following
a. provide the variable you assigned at the previous step in the ReadOnlyVariables.
b. click eidt script and provide the C# code that write the variable to the xml file in question.

Do same for the other query.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 18 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100