title: How to Add the Result Set from a T-SQL Statement to a Data Flow?
body: <p>I have a simple SSIS package, and I'd like to complicate it a little.</p>
  
  <p>Right now, it executes a stored procedure in an OLE DB Source, and adds the rows returned from the stored procedure to the data flow. Then, for each row returned, it executes an OLE DB Command transform, executing a second stored procedure (in a second database), passing the columns from the source as parameters.</p>
  
  <p><img src="https://i.stack.imgur.com/wG8qa.png" alt="enter image description here"></p>
  
  <p>The second stored procedure performs a synchronization function, and I would like to log the grand total number of adds, deletes and updates. The "sync" stored procedure  uses the OUTPUT clause of a MERGE statement to get this data and return it as a resultset.</p>
  
  <p>I don't see a way to get this resultset out of the OLE DB Command transform. It does not allow me to add output columns.</p>
  
  <p>Short of adding a Script Transform, is there a way for me to log the grand total of the add, delete and update columns?</p>