title: SSIS 2012 Full Result Set to set variables
body: <p>I'm trying to create an SSIS package that reads a mapping table that contains foreign key information and tables they point to and store the full result set to be used to populate 7 columns representing columns in the result set that is then used to update an xxxSID column on 6 servers.</p>
  
  <p>I'm stuck!  Please help.</p>
  
  <p>I've created the SQL Task with query to build the result set and mapped to object variable SidMap and the task runs successfully however, I don't know where to go from there.  Some blogs say create a ForEachLoop Container and map the object variable to the collection which I've done.  I've also created string variables representing the 7 columns but don't know how to populate them.</p>
  
  <p>The blogs I've read so far suggest this can only be done from a Script task.  Is that true?  If so how is it done?</p>
  
  <p>Another user posted a question that sounded like he may be doing the same or very similar thing using a SQL Task but I didn't see how he was populating the column object variables and then converting data into string variables.
  <a href="https://stackoverflow.com/questions/20643081/ssis-result-set-foreachloop-and-variable/23021491#23021491">SSIS Result set, Foreachloop and Variable</a></p>
  
  <p>Currently I'm updating tables manually using a cursor.  If anyone cares to see the code I can post it but didn't think it relevant to the question other than providing a clear picture of what I'm doing.</p>