Simple fixed width file doesn't show correctly in Preview

Naomi Nosonovsky 8,051 Reputation points
2022-06-13T20:39:28.58+00:00

Hi everybody,

I have a simple txt file which has header row, detail rows and trailer row. I defined 3 different flat file managers (actually, I used existing package, but completely re-defined the connection managers). I defined my columns correctly according to the specs. All columns are manually set up to the widths defined in the supporting Word document. I set file format as fixed width and delimited with CRLF.

When I preview first 5 rows, it looks incorrect :( I cannot figure out what is wrong, all columns are defined as DT_STR with correct lengths. The original file used ragged right as the file type, but in my case the columns are fixed - why it's not working?

One more question - is there a 'CONTAINS' or similar function to check for 3 predefined types? Right now I'm using this expression in the conditional split - is there a way to simplify it?

record_type_cd != "10" && record_type_cd != "20" && record_type_cd != "90"

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,299 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,628 questions
{count} votes

Accepted answer
  1. ZoeHui-MSFT 39,591 Reputation points
    2022-06-14T05:41:04.073+00:00

    Hi @Anonymous ,

    I followed this tutorial, everything seems work well, you may take a reference to.

    ssis-how-to-load-fixed-width-text-file.html

    Regards,

    Zoe


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

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.