Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 export sql database to xml using SSIS 2005

Author  Topic 

ashishkgb
Starting Member

1 Post

Posted - 2012-11-08 : 01:28:36
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
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-11-08 : 05:52:23
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
   

- Advertisement -