April 23, 2015 at 8:23 am
I need to import a fixed length file but each row is different length. I don't know how to define it in SSIS flat file connection.
For example
A001xxxxxx
A002xxxxxxxxxxxxxxxxxxxxxxxx
A003xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDxxxxx
Thanks
April 23, 2015 at 8:28 am
Loner (4/23/2015)
I need to import a fixed length file but each row is different length. I don't know how to define it in SSIS flat file connection.For example
A001xxxxxx
A002xxxxxxxxxxxxxxxxxxxxxxxx
A003xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDxxxxx
Thanks
That isn't a fixed length file. A fixed length file each row is the same length. This looks like a ragged right file. With what you posted it is a bit difficult to provide much help. Can you tell us more about the file and the type of data it contains?
April 23, 2015 at 8:31 am
Do you mean a fixed-width file?
I've never heard of a fixed-length file before.
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
April 23, 2015 at 8:40 am
I guess I should say each row is fixed length based on the first 4 character.
Each row - the first 4 character is segment type, then next 3 character is length of the row, then the rest of of row is different data info.
A001062Header....
A002012Data is good or bad
A003020CustomerData
ENDS010total number of segment for this customer, in this case it is 004
Thanks
April 23, 2015 at 10:57 am
You'd probably want to look at a splitter process. You'd bring the entire line in as a single variable , inspect the 4 characts, and use a conditional split to branch out into the specific extraction and mappings you find based on the types of templates you have.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
April 23, 2015 at 5:07 pm
Smells like an "EDI" file.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 23, 2015 at 5:32 pm
or HL7 (the old-style ones that is).
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
April 26, 2015 at 5:33 pm
this article may be of some help
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply