Hi @Anonymous ,
1.Please drag a Data Flow Task and load data from source table1 to Recordset Destination which can store data in object variable;
2.Then use Foreach Loop Container to read data from object variable and load data into a string variable;
3.Drag a Data Flow Task in the Foreach Loop Container and load data from source table2 to newtable2 in Flat File Destination;
4.Set the expression for [Flat File Destination].[Header] in properties of Data Flow Task2.
Please refer to the following pictures:
Best Regards,
Mona
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.