0
votes

I'm having a strange problem with SSIS. I'm exporting some data from a database into a flat file. It comes out all fine - except that rather than displaying the data like this:

ID FirstName LastName Age

It comes out like this:

ID FirstName LastName Age ID1 FirstName1 LastName1 Age1

Now, its not repeating the same data (ever), so the data might realistically look like this:

1 John Doe 23 2 Jane Doe 22

Why is it repeating like this?

2
Are you maybe not getting the line-breaks. It looks like it might be putting two rows (or more if it continues) on every line.Kyra
It is fixed width...I'm not seeing any way to put in line-breaks for fixed width?Dave Mackey

2 Answers

1
votes

In a fixed-width destination (even though it's "text") - it's really fixed width records (just in a text representation in the code page of your choice), one after another with nothing in between them. So you need to add a record/row delimiter - in this case CRLF.

If you are in a Flat file destination component and click the new button to crete a destination data adapter right there - the "wizard" gives you four options. The difference between fixed-width and fixed-width with row delimiters is that it just puts a little CRLF column on the end.

1
votes

It sounds to me like the row delimiter from your file source is wrong. It's reading in two or more rows as one row.

What are the output columns listed on the flat file source? If you see all of those you listed, I would almost guarantee this is the issue.

What is the actual layout of the source file? Is it delimited, fixed width columns, etc?