Link to home
Start Free TrialLog in
Avatar of hydev
hydevFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Nested For Each

Hi,

I'm not sure if is possible in SSIS but I have 2 DataSet's and I would like to do a nested loop.

Therefore:

For Each Row in DataSet1 (loop through each header)
          For Each Row in DataSet2 (loop through the details that are equal to the header)

To help you understand DataSet1 is the Headers and DataSet2 is the Details.  Additionally the Header Rows are each numbered and the Detail Rows have the unique header row number in them.

I know I can do this in Scripting tasks but I just wondered if there was a proper/elegant way of doing it in SSIS.

Any help greatly appreciated.

Mike
ASKER CERTIFIED SOLUTION
Avatar of raulggonzalez
raulggonzalez

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of EvilPostIt
EvilPostIt
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
if this is .net datatables and datasets then you can set up and use data relations to return all the child rows for a parent
Avatar of hydev

ASKER

You have both given me ideas to possible solutions so thanks.