Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

ForLoop Eval Expression

$
0
0

Hi Team,

We have a scenario where we have to check two tables(say table1 primary and table2 back up) continuously and the data should be pulled as soon as one of the table is loaded. To do this we have used a ForLoop which is checking for two variable values(this value is Rowcount of the tables) continuously and whenever the value of any one variable is greater than 0, ForLoop should be success and it should proceed to pull the data.

 

Inside the ForLoop we have two ExecuteSQL task which is counting(Select Count(*) from table1) the number of rows in table1 and table2 and assigning it to the variables (@LoopRecordCountPrimary and @LoopRecordCountSecondary).

 

The EvalExpression for ForLoop is (@LoopRecordCountPrimary==0) || (@LoopRecordCountSecondary==0)

 

Now the issue is, ForLoop is becoming success only when both the variables are having values greater than 0, but we want it to become success when one of the variable is greater than 0.

 

I request you to please suggest or guide us. Thanks much for your time.

Regards

Jim


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>