DataMigration-Urgent

  • How to import excel file into sql server 2005 using SSIS 2005?

    i want to import only selected rows (i.e., 5th row to 100 rows ) from excel file to sql server 2005?

    Is there ANY option to specify starting row and ending row in SSIS 2005?

  • It seems that the fastest way to get this done would be to put it into a table first and then select the rows you want out of that table. Your intermediate table will have an identity col that counts the rows and then you can select where ID between 5 and 100 in your next step in the package. then delete the table or truncate it at the end. I'm sure there's a way to finesse it in SSIS, but that would involve a cursor and this method, while a bit of a brute force, will actually perform better.

    So create your table with your counting col, then put all your xls data into it. Then just select the data you want and put it into the real table. Done.

    Watch my free SQL Server Tutorials at:
    http://MidnightDBA.com
    Blog Author of:
    DBA Rant – http://www.MidnightDBA.com/DBARant

    Minion Maintenance is FREE:

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

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