Multiple execution of SSIS package

  • Hello,

    I am new to SSIS and learning it on my own. I got an issue,

    I have a ssis package which queries multiple tables (my data source- sql command mode in oledb souce) and saves data in a flat file.

    This query is actually a store proc which gives rows according to the user input

    just like

    select columns from table where customerid = @cusid.

    Till now i was prompting userimput from user before execution of the packing using script task.

    Now i want to execute this package once for all customers.I mean i want this ssis package to generate one flat file (destination) each per customer for all customers in the base table.

    So how to use cursor? or how to use for loop and pass customerid as user input for the store proc?

    Please help

  • You can store the customerIDs in a table and loop over this table with a for each loop container.

    In the for each loop, you can configure in Variable Mappings that the current customerID is written to a variable. Pass this variable to your stored proc.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 2 posts - 1 through 1 (of 1 total)

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