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
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,948 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,474 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 33,941 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.