Dave Mackey
Dave Mackey

Reputation: 4432

SSIS Creating Two Columns of Data in Flat File?

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?

Upvotes: 0

Views: 447

Answers (2)

Cade Roux
Cade Roux

Reputation: 89671

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.

Upvotes: 1

Kenneth
Kenneth

Reputation: 1364

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?

Upvotes: 1

Related Questions