How to import top row only and ignore other rows using SSIS

  • Hi,

    I want to import flat files into a sql table. I only require the top row each time a file is imported. How can i set up my SSIS package to import that row only.

    The format of the files is:

    3178593|M120|010|3206304|AF-01566|20130917|1123|3

    0007|900548|00002|||00000.000|TOS

    0013|3043213|00001|||00000.000|EOE

    0014|270652|00001|75-104||00000.000|TOS

    Thanks

  • Any idea? I believe i can use the conditional Split. But I am struggling to find a way to use this.

  • What are you importing into, SQL Server? How many records in the flat file?

  • have a look at this. Read the first N rows[/url]

  • Thanks for your reply. I am trying to import a flat file into an SQL Server table.

    The file structure is as follows:

    3178593|M120|010|3206304|AF-01566|20130917|1123|3

    0007|900548|00002|||00000.000|TOS

    0013|3043213|00001|||00000.000|EOE

    0014|270652|00001|75-104||00000.000|TOS

    I am only interested in importing the first row. On a daily basis i may have multiple files, but the only row I am interested in importing is the top row.

Viewing 5 posts - 1 through 4 (of 4 total)

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