Click here to Skip to main content
12,295,457 members (54,242 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 9:50am

1 solution

Rate this: bad
 
good
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.
  Permalink  

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
Web01 | 2.8.160525.2 | Last Updated 18 Feb 2013
Copyright © CodeProject, 1999-2016
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