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

SSIS SQL 2012 - For Each Loop Issue

$
0
0

I have a SSIS package that reads a SQL table then outputs each record individually as an xml file. This part works well and I need to execute this for each record in the SQL table as the source system can only handle one XML file at a time. Also everytime the process runs it updates a sent filed from a 0 to a 1 so I know what was processed.

My Issue is I need to create a loop in the control flow to look at the sent filed and process the next file as long as it does not have a sent status of 1. I know I need to use a for each loop in the Control Flow and define a variable but I have not had a lot of luck getting this to work.

These are the column names I am pulling the info from -

[place_id]
      ,[address_type]
      ,[address]
      ,[second_address]
      ,[third_address]
      ,[zippost]
      ,[city]
      ,[state_prov]
      ,[country]
      ,[user_def1]
      ,[DataDate]
      ,[Line_ID]

Maybe you guys have a site with a good example to use? I think it is the concept of setting up the variable that is giving me the most difficulty.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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