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

Execute store procedure( in Id, in out RefCursor), and data fetched in ref cursor should be sent out as excel sheet.

$
0
0

I am trying to make a ssis package that get the data calling the store proc with two param one is ID and other is Sys_refcursor. Say Store Proc as ListName(Id int, myCur sys_refcursor), which gets the datas with the conditions inside it.

REATE OR REPLACE PROCEDURE schemaName.LISTNAME (P_ID  IN INT, LST_NAME_REFCUR   IN OUT SYS_REFCURSOR)
IS
P_NAMESOURCE_ID INT;
BEGIN
    SELECT SOURCE_ID INTO P_NAMESOURCE_ID FROM SEARCHING_TABLE ST WHERE ST.ID = P_ID;           
               IF (P_NAMESOURCE_ID=1)
               THEN
                  OPEN LST_SOURCE_REFCUR FOR 
                        SELECT ST.ID,
                               ST.TRANSACTION_DATE AS TRAN_DATE,

.....                                                                        IF (P_NAMESOURCE_ID=1)
               THEN 
                  OPEN LST_SOURCE_REFCUR FOR             ....     

then i need to get the data from that refcursor and fetch those data to excel sheet to a virtual directory.

Any help would be appreciated. I am new to SSIS. and i need to do this assignment this friday.   


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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