Import CSV file into multiples tables using SSIS

  • Hello Everyone,

    How's Everyone doing? I hope all is well.

    I have CSV file with a million rows that I need to split into 4 tables(250,000 rows to one table) and I can use your help. I want to use SSIS to upload the CSV file(split 4 ways) into 4 different tables). Can anyone help me with this please; Do I use a conditional split? And if so, what will be the expression written?

    All ways to do this is appreciated.

    Thanks in advance!

  • You'll have to derive a row number for this purpose.   You can do so by adding a Script Task to your data flow, and you'll need a package variable to hold on to that value across rows.   The Script Task will just increment the value of that variable and place that value in the row..  This will be easier if you do a Derived Column Transformation first to just create a new column with a NULL value of the DT_I4 data type (integer).  Your Script Task would just change the value of that row's "derived column" to the incremented value of the package variable.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

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

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