DTS adds extra blank line to Text File

  • I have a slight issue which I cannot nail down. I have a simple DTS package (created by someone else) that pulls a dataset out of a table via a view and drops it into a flat text file.

    However when you open it up and scroll to the bottom, there is an extra blank line at the bottom of the file. Normally it wouldn't be a big deal, however the system that picks up this file recognizes that blank line as an error record for some reason.

    I have gone through evey option of connection properties...and the dts transformation task but I cannot figure out if this is normal behavior or I am missing something.

    If anyone has a recommendation I would appreciate it.

    Thanks,

    Leeland

  • Try to change in your DTS package-->destination file-->Properties-->>Row Delimiter from {CR}{LF} to {CR}


    Kindest Regards,

    Vasc

  • I have tried everything in the properties, I have removed all the settings for row delimiter...I have changed it to be just {CR}, it still leaves the extra line at the end of the file. Is this the normal pattren for DTS exports to a flat file? Or am I missing something?

    EDIT:

    To put it another way...the column that is pulled into the text file is build via t-sql and put in a table.

    Then a simple select "column" from table into that text file is all the transformation does. Problem is that if I don't put the {CR}{LF} on it, the columns don't line up...i.e. it just puts each line after the previous one and all the formatting is gone. Plus it still has an extra line at the bottom.

    I do not think this is a huge deal as the end user said he can work around it, however I am curious if all flat files have the extra line put at the end.

  • The {CR} for end rows doesn t give and extra line.

    The "extra line" is given by the {LF}

    You can open the result file in a HEX editor and check the content of the file.

    What you want is to change the ROW TERMINATOR for LAST record... don t think you have such an option

     


    Kindest Regards,

    Vasc

  • That is exactly what I would want to happen but you are correct to the best of my knowledge...there is no ROW Terminator for the last record.

    I guess I will have to see if I can find a work around...

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

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