Using SSIS to write to a Fixed Width FlatFile

  • I have a SQL statement I am using to write the data to a fixed witdth txt file. The destination file will only have 3 lines, all of them 147 characters in length. Need to set {CR}{LF} as row delimiter

    The first line needs to be divided into 6 columns

    The second line needs to be 11 columns.

    The third line needs to be 3 columns.

    I have all the specs so i know the length to set each column too.

    I am looking for help with setting up the destination file to have a different number of columns in each row.

  • Thanks for the suggestion. I ended up cheating. I used a SQL statement, and some unions, to just put it in 3 large columns, all that were the correct length. so

    select '00000 33333 33'

    union

    select '00 99 555'

    union

    select '66 44 22 11'

    something like that, it's kind of cheating, but it worked.

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

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