Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ForEachLoop container? 1

Status
Not open for further replies.

manmaria

Technical User
Aug 8, 2003
286
0
0
US
I have a sql task which takes tablename as a parameter and writes in a file with tablename as part of the file name. Unique table names can be available from a table. Right now I am generating one file at a time inputing the table name every time. Can I do this task using a Foreachloop container or something?

TIA
 
Yes, you can.

You can use a "SELECT TableName FROM ..." Sql Task to generate the result set as a Full Result Set, and pass thatthrough as a variable to the Foreach Loop container.

Within the container you can then call the Sql Task that takes the parameter and writes to the file, using the table name from the recordset as a parameter to pass to it.

Give me a few minutes and I'll dig out an article for you, with more information

~LFCfan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top