Trimm off any extra spaces in File Connection Manager for a field

I have a field that in my File connection manager is set to 4 as the column width.  Only about 50% of the time will that field have 4 chars, and 50% of the time it will be 3.  The problem is that when it's only 3, my flat file that is produced obviously then has an extra space between this field and the next which can't be allowed.

Is there any way to tell that field to trim off that extra 4th space if it's not all filled when a record is written to the flat file

how do I do this




Answer this question

Trimm off any extra spaces in File Connection Manager for a field

  • JoeLopez

    No, it is not possible with a fixed width or Ragged-right format. There is no way to trim off that extra space.Not sure what your requirements are, but perhaps delimited format would serve you better, where it puts a delimiter as soon as the last character is written, and then writes next column.

  • Trimm off any extra spaces in File Connection Manager for a field