December 1, 2017 at 10:35 am
I'm creating a flat file with a fixed length of 490 characters. Here's a snapshot from the Advanced page in the connection manager.
I map one 490 character column to this file.
For some reason, the file always has 12 extra bytes. The row length is 502. It was a varchar field so I tried making it char(490) but that didn't do anything. I'm stumped. Anyone have any ideas on how I can eliminate the extra 12 characters? This is happening in every flat file I create and it's always 12 extra characters regardless of the length of my record.
"Beliefs" get in the way of learning.
December 1, 2017 at 10:40 am
Can you post a (simple) sample package which has this problem? I'll have a look if you do.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
December 1, 2017 at 10:55 am
Not sure how to do that as I can't upload an xml file or a dtsx file.
"Beliefs" get in the way of learning.
December 1, 2017 at 10:58 am
I saved the XML as a txt file. Hopefully that's good enough for you.
"Beliefs" get in the way of learning.
December 1, 2017 at 11:21 am
Have you checked the generated text (for example with a hex editor) to see what the extra characters are? Are they at the beginning or end of the line. Are they row (or column) delimiters?
Just some ideas to trouble shoot.
HTH,
Tim
December 1, 2017 at 11:24 am
Got the file, but the reason I asked for a simple package was to avoid errors like this 🙂
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
December 6, 2017 at 12:33 pm
Robert Frasca - Friday, December 1, 2017 10:35 AMI'm creating a flat file with a fixed length of 490 characters. Here's a snapshot from the Advanced page in the connection manager.I map one 490 character column to this file.
For some reason, the file always has 12 extra bytes. The row length is 502. It was a varchar field so I tried making it char(490) but that didn't do anything. I'm stumped. Anyone have any ideas on how I can eliminate the extra 12 characters? This is happening in every flat file I create and it's always 12 extra characters regardless of the length of my record.
Clearly, you have more columns in your file than the 490 character one, so you will get more than 490 characters in any given row, even if you have no column delimiters, if either of those other columns have any data, or are defined as character data of a fixed length. Not sure how you expect a file defined that way to not leave room for the other columns.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
December 6, 2017 at 1:16 pm
Uh...no. One file, one 490 column field called TextData. The file is for exchanging fixed length data records.The columns have all been concatenated into one 490 character string. This is old school.
This package originated in SSIS 2008 and I've upgraded it to 2016. Must have forgotten to disable the package configurations.
"Beliefs" get in the way of learning.
December 6, 2017 at 2:01 pm
Robert Frasca - Wednesday, December 6, 2017 1:15 PMUh...no. One file, one 490 column field called TextData. The file is for exchanging fixed length data records.The columns have all been concatenated into one 490 character string. This is old school.This package originated in SSIS 2008 and I've upgraded it to 2016. Must have forgotten to disable the package configurations.
I was basing my statement on the picture you supplied, which showed 3 columns in the "destination". Did you get this solved?
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply