Splitting the records from a File using SSIS

  • How can we implement splitting of records using any transformation.

    We have to split no of rows (for example for each set of 100 rows we need to create a seperate text file).

    Thanks in advance..

  • The easiest and most efficent way to do this would be to load all your data into a staging table on your SQL server, and then split our the rows using a Loop container based either upon a sequential ID in your data or from an Auto-Increment ID that you would have populated when the data is inserted.

  • Is there any way to implement conditional split using variables. Otherwise I will be required to load data once in a database and then thru looping splitting the records.

  • You could probably do it using a custom script, but I never have done this as I would always go for the staging table option.

    Why do you not want to use a staging table?

  • [font="Comic Sans MS"]

    Do you have any control over generating the recordset?

    If yes - you can use a pseudo-column in the recordset - say setNum - and it would contain 1 for first 100, 2 for second 100 etc ..

    Then you can map with a variable use a for each loop to do this.

    [/font]

    [font="Comic Sans MS"]--
    Sabya[/font]

  • Thanks

  • Nothing special..just wanted to check if there is another workaround

    available.

    Thanks for the help....

Viewing 7 posts - 1 through 6 (of 6 total)

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