SSIS - Flat File Destination Fixed Width Columns Appear to be Ragged

Ken Wenze 0 Reputation points
2024-05-16T22:31:35.1166667+00:00

I am trying to create a flat file export, the spec is fixed width column, no headers or delimiters. There are 16 columns, the total width of all the columns combined is 624 characters.

i have attempted two methodologies, both yield the same result where the exported text file reveals a ragged right file format.

The SQL is padding all columns using a REPLICATE function to pad columns and force datalengths

Method 1: Define Each column to spec, export

Method 2: Concatenate all columns, force 624 string length.

ssis flat file fixed width

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,703 questions
SQL Server | Other
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 41,491 Reputation points
    2024-05-17T03:02:02.1366667+00:00

    Hi @Ken Wenze,

    You may use Fixed width in the flat file connection manager editor like shown.

    User's image

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.