Export Fixed Width

  • Hello I am exporting a fixed width text file and it works fine until the end users try importing it into external system. I have the format set to Ragged Right so it separates each record to its own row. When i try importing the file into there system it would throw an error then i messed around with the file and removed one space at the end. That seemed to do the trick. Is there something that i am configuring incorrectly or need to do in SSIS to fix this? I am using SSIS 2012.

    Is using Ragged Right adding another column?

    Thanks !!

  • elee1969 (2/26/2015)


    Is using Ragged Right adding another column?

    What's preventing you from trying it to see?

    --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)

  • Jeff Moden (2/26/2015)


    elee1969 (2/26/2015)


    Is using Ragged Right adding another column?

    What's preventing you from trying it to see?

    Hi Jeff, I am using it. Maybe i worded it wrong. I am using Ragged Right for my fixed width file. This file has 12 fields and each field line up correctly in its starting position. I was thinking that maybe using Ragged Right format which uses a CRLF to end each row caused it to have another field. This file will not import into our external system without me deleting a space at the end of each row. So is using Ragged Right causing it to have another space ? Or is there another solution?

    Thanks!! 🙂

  • Apologies for the very late reply.

    To the best of my knowledge, ragged right doesn't add a space or any such thing but I question the use of ragged right for fixed field length data to begin with. For fixed field exports, all rows should contain the same number of bytes especially since a lot of import software can't actually handle ragged right files.

    Shifting gears, the problem that the folks on the other end may not realize is that you're using a 2 byte "CRLF" line termination. If they're only looking for "LF" or only "CR" in the import software, then it could very well look like an extra space is being added depending on how the software handles such "white space" characters.

    --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