use output parameter of stored procedure to determine data flow task

  • I have SSIS package that loops through files in a directory and based on their content loads the data into a table and archives the file or not.

    i use a foreach container to loop trough the files. within the container their is a a sql task which executes a stored procedure. The stored procedure takes 2 input parameters and one output parameter.

    I would like to use the output parameter of the stored procedure to determine my next task. if it = 0 then it should move the file to folder A If it = 99 it should move the files to folder B. Currently i have a filesystem task that moves files to Folder A regardless of the output of the stored procedure. How can I amend my package to move to do this?

  • Have two unique tasks and use a script component to evaluate the variable. Enable/disable tasks as necessary per pass in the script.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Hi,

    many thanks. will give it a go.

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

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