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 wanna right a SSIS package where for a particular ID entry in my table, I want that particular table contents to be exported to the destination file specified.

    I want to load this table into a dataset and then iterate through the ID column using a variable and then export to the table content to a textfile using a foreach loop container in SSIS.

    when ID =1, Table1 contents should be output to textfile1

    and then Table2 contents should be output to file2, sequentially.

    Since the IDs are 1,2,3.. Can somebody please tell me how I can run 3 sub packages, where I can say if ID in table is 1, then export those corresponding tables to the corresponding files.

    But for a particular ID, the exports have to be sequential but since there are many IDs, I need to run the subpackages for each ID 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.

    But at the same time, since the IDs are different, I want the 3 sub packages to run parallely

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

    http://qa.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