Transfering data from file to sql server of 10 records at a time in SSIS

  • Hi Friends,

    I am having a scenario of inserting data from flat file to sql server in SSIS

    The requirements are

    1.Flat file consisting of 100 records

    2.program should do a batch insert of say 10 records at a time in a sql server table

    I dont know how can we insert the records in a batch..Is there any solution for it..Please guide me

  • I would have to ask about the underlying process, please help me understand why you want to do this. A bulk insert would be way more efficient.

    CEWII

  • HI

    You could look into using For Each Loop in SSIS but again, why would you want to complicate the process.. Is there a reason for this to done in this way

    Cheers

  • Hi,

    Thanks for replying

    we got the requirement to create the package in that way...

    Even i thought of using for each loop...But using that we can only iterate for the count of 10..

    how can we restrict in the flat file in which there are n number of records..

  • In your environment is there a process to challenge a requirement? I have experienced many cases where the business makes a technical requirement without being able to justify or understand what that requirement means when it is coded. A requirement like "keep batch processing sizes low" could be translated into what you have described. What are they trying to accomplish with this requirement?

    If you must comply I think you can set batch commit sizes on the destination.

    CEWII

  • In your environment is there a process to challenge a requirement? I have experienced many cases where the business makes a technical requirement without being able to justify or understand what that requirement means when it is coded. A requirement like "keep batch processing sizes low" could be translated into what you have described. What are they trying to accomplish with this requirement?

    If you must comply I think you can set batch commit sizes on the destination.

    CEWII

  • In your environment is there a process to challenge a requirement? I have experienced many cases where the business makes a technical requirement without being able to justify or understand what that requirement means when it is coded. A requirement like "keep batch processing sizes low" could be translated into what you have described. What are they trying to accomplish with this requirement?

    If you must comply I think you can set batch commit sizes on the destination.

    CEWII

  • Hi

    If you need to do this only in this way an option is -

    import all the data into a temp table - using a procedure - you can import 10 rows into the final table.

    the procedure can be called for from the package itself

    sorry but just a random thought

    cheers

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

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