SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 export sql database to xml using SSIS 2005
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ashishkgb
Starting Member

India
1 Posts

Posted - 11/08/2012 :  01:28:36  Show Profile  Reply with Quote
Hi,
I want to export sql data to xml using SSIS 2005 but the condition is that for each record different xml file has to be generate i.e. suppose i have queried in database and it gives 1000 of records then 1000 no. of xml files should be generated during export.


Thanks
Ashish

sunitabeck
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 11/08/2012 :  05:52:23  Show Profile  Reply with Quote
Use a foreach loop container that loops through each row of your table. Take a look at this link - it walks you step by step through what you need to do (except for the XML part; you can use one of the FOR XML constructs to get the data as XML).

http://www.simple-talk.com/sql/ssis/implementing-foreach-looping-logic-in-ssis-/
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000