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.
Author |
Topic |
LearningSQLKid
Yak Posting Veteran
51 Posts |
Posted - 2012-06-20 : 03:41:33
|
HI GuysI have a ForEach Loop defined in control flow and it populates three variables. One of the variable is a Boolean variable and if the value of this variable is true i need to execute a bunch of tasks defined in Sequence container otherwise move to next row in record set.Any idea how would i do this ?Appreciate your timeMany Thanks Select Knowledge from LearningProcess |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-06-20 : 04:12:55
|
You can set the precedence constraint (pipe between tasks) to evaluate on an expression. Just have two paths frrom your loop container and both evaluate an expression using the variable.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
LearningSQLKid
Yak Posting Veteran
51 Posts |
Posted - 2012-06-20 : 07:29:44
|
Thanks nigelrivettBut what would be my first task (The task from which the precedence emerges) ?Ok i explain a bit further.I have a ForEach Loop component set up and it loops through all the records in the table. Say there are 10 records in table. The table contains a field called "Status". Let say there are 4 records in a table where the status is TrueSo to accomplish this, i have setup a ForEach loop container and within the ForEach Container, i have Sequence Conatiner which holds three Execute SQL tasks that runs in parallel.Did u get where i am going to ?Any idea ?Select Knowledge from LearningProcess |
|
|
|
|
|