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

PLEASE HELP! OLE DB COMMAND - capturing Stored Procedure output run from an OLE DB Command

$
0
0

I've searched through the related posts but cannot find exactly what I'm looking for.

I have an OLE DB Source that produces multiple rows (around 200) through a stored procedure. I need to take 3 values in each row and pass them to an OLE DB Command that runs another stored procedure for each row.

What I need is to get the output of the second stored procedure. I've read posts regarding using lookup, merge join, derived column but I still don't understand exactly how to put it all together. My destination is an excel file. Once I've obtained this output, I believe I can figure out how to merge the OLE DB Source results and the OLE DB Command results into one table.  The output columns of the second SP are not available to be mapped to my destination file.

I've also explored running an Execute SQL task and passing the rowset to a variable but don't know how to pass that variable into the next stored procedure and then capture the second stored procedure results.

OLE DB Source contains Stored Procedure X:

DECLARE@return_value int
declare @newdate smalldatetime
set @newdate = convert(smalldatetime,convert(varchar(10),getdate(),101))

EXEC@return_value = [dbo].[getnumbers]
@dtAfterDate = @newdate,
@dtBeforeDate = '2099-12-31 5:00:00',
@Status = 'Any'

NEXT IN THE PIPELINE

OLE DB Command contains Stored Procedure Y:

EXEC[dbo].[getaddress] ?,?,?

One more thing, CREATING A TEMP TABLE ISN'T AN OPTION!

Thanks!


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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