SSIS - Variables and ScriptTask

  • I have a table named My_Table with 3 colums.

    TableName TextFileDestn ID.

    tbl1 C:\file1.txt 1

    tbl2 C:\file2.txt 1

    tbl3 C:\file3.txt 2

    tbl4 C:\file4.txt 2

    tbl5 C:\file5.txt 3

    tbl6 C:\file6.txt 3

    I want to import My_Table into a dataset and then iterate through the ID column using a variable.

    I want to write 3 sub packages.

    When we loop through the ID:

    (a) Sub-package 1: When ID is 1, I want to export table1 to file 1 and then export table2 to file 2

    (b) Sub-package 2: When ID is 2, I want to export table3 to file 3 and then export table4 to file 4

    (c) Sub-package 3: When ID is 3, I want to export table5 to file 5 and then export table6 to file 6

    i want sub-packages 1,2 and 3 to run parallely.

    I know this needs use of variables, conditional for loop. But I dont know how to use 3 variable for 3 different columns to dynamically export data to text files.

    help needed. Thanks a lot in advance.

  • Just a note, please don't cross-post. Please make comments at:

    http://www.sqlservercentral.com/Forums/Topic859017-148-1.aspx

    CEWII

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

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