Execute Task In SSIS

  • Hi Friends

    I used Execute SQL Task to call the Stored Procedure.

    Can anybody helps me that how to get the results from stored procedure in excel format.

    thanks

  • I am not aware of the straight line answer.

    This is only a work around / suggestion to you.

    Can you use the stored procedures to generate the data and store in a staging tables and then in Dataflow task use those tables (OLE DB Source) and destination as excel file destinations.

    Hope someone will give another solution which would be more easier and better one.


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • Thanks ,it gives me some ideas.

  • anitha.cherukuri (11/24/2009)


    Thanks ,it gives me some ideas.

    Start to work on it and lets hope someone would come up with their brilliant idea. 🙂


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • why can't you use the SP as the SQL of your data flow source and use an Excel destination?

  • Hey Anitha,

    you can achieve this by giving the exec sp query in the oledb source.

    Now the question is, are you passing any parameters ?

    If yes, the parameters should be defined as user variable with scope at the package level.

    Let me make it very clear...

    Go to the DataFlow task- select oledb source from the toolbox - In the oledb connection manager select the desired connection string - in the data access mode select sql command- in the sql command text give ur exec sp query.

    Now on the right hand side you can see a tab as Parameters, click on it and map the variable to parameters in the sql statement.

    Remember that the parameter name should be same as the actual parameter name in the sp.

    Click on OK.

    Now select a excel destination from the toolbox. Give the connection string and connect the oledb output to the excel destination. Map the columns in the excel destination to the oledb output columns.

    I hope this solution works fine for you.......:-)

    With Regards,
    Anu..;-):hehe:

  • Thanks for your time,i did as you expanined..it worked well........

    Regards,

    Anitha

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply