Hello,
I have a package, which calls a sub package to poulate a table depending on a flag in the database (using an ExecuteSQL task to return flagged table name).
The inner package populates some tables, and calculates what needs to be processed next. It sets the next flag.
However, I can't make this work in the control flow, as once the Execute package has completed, I need to start again from the top, as the flag will have changed to the next item.
I hope that I have explained this well enough.
I really need this to work, but SSIS will not let me create a circular dependency. Does anyone know a way around this, or can offer me an alternative solution?
I am getting desperate, so any suggestions will be welcome
Many thanks
The Foreach Loop Container may be of use. have you evaluated that?
Regards
-Jamie
|||
Hello Jamie,
Thanks for the reply.
Yes, I have, but as I have to pass it a recordset at the start of the for each.. it doesn't seem to fit the bill. I have to pick up these tables in an order only defined at run time by the sub package.
|||The Foreach container is exactly what you need to use. You will need to store your recordset in a user variable using an ExecuteSQL task and then use the Foreach container with a Foreach ADO enumerator. More direction is available on BOL but that should be enough to get you started.|||Oh dear,
I am not explaining this very well, I;m sorry.
On the first pass I will get a table name from ny ontrol table which beeds to be populated. Once this is populated, I will mark the parent tables next to be processed in my control table.
So on the second iteration, I need to retrieve a new recordset to pass to the For Each loop. And so on.
Sorry if I am being obtuse, but I can't see how I can make this work.
No comments:
Post a Comment