Flat files without delimiters

  • Hi,

    I have a flat file without delimiters. The format is like

    L10123444 221

    but Col1 = L;col2=1;col3=0123444 etc...

    how to import this kind of flat file

    Thanks in advance

  • Use fixed length option in flat file connection manager




    My Blog: http://dineshasanka.spaces.live.com/

  • In the SSIS Data Flow you would use a Flat File Source. Configure the sources connection manager to use the "Ragged right" format and mark where the columns should be delimited, including the appropriate row delimiter. In the Advanced options change the properties for each column, such as Column name, data type and width. Then connect that to your destination.

    If the fields won't be in the same position and same width the above won't work. For that you could still use a Flat File Source and read each row to a single column, then split that row up within a Script Component.

  • karthi (2/25/2008)


    Hi,

    I have a flat file without delimiters. The format is like

    L10123444 221

    but Col1 = L;col2=1;col3=0123444 etc...

    how to import this kind of flat file

    Thanks in advance

    All of the methods suggested, so far, are good and will do.

    If you want absolute blinding speed, though, using Bulk Insert with a BCP format file will out perform just about anything else you can do. The information for a BCP format file is in Books Online.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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