L
LeAnn
Hi, I have a challenging project that I need some assistance with. I'm using
Access 2003. I need to import a fixed width text file (example below) and
re-export it and make it match the same format. In the original file,
CONTRACT# is always the same. The reason I need to do is to match the unit
numbers to the appropriate client that I track in my database and export unit
numbers into separate client export files. I’m not sure how to begin with
the import – we can deal with the export later. Since each line has different
column widths, I’d expect to have to read each line, evaluate what type of
line it is and import them into different tables. Do I want the Line
identifiers imports? The spaces are considered separate columns – I don’t
know if that is typical or not but not sure how to handle those. I
appreciate any assistance. LeAnn
FH:CONTRACT# ABC 03/08/07:00:25:42 F N CLIENT NAME
BH:BATCHNUMBER
UI:UNITNUMBER1 UNITNUMBER1
TR:TEST1 1 73 73
TR:TEST2 1 NR NR
TR:TEST3 1 NT NT
TR:TEST4 1 NR NR
TR:TEST5 1 NR NR
TR:TEST6 1 R R
TR:TEST7 1 NR NR
UI:UNITNUMBER2 UNITNUMBER2
TR:TEST1 1 06 06
TR:TEST2 1 NR NR
TR:TEST3 1 NR NR
TR:TEST4 1 R R
TR:TEST5 1 NR NR
TR:TEST6 1 NR NR
TR:TEST7 1 NR NR
UI:UNITNUMBER3 UNITNUMBER3
TR:TEST1 1 51 51
TR:TEST2 1 NR NR
TR:TEST3 1 R R
TR:TEST4 1 NR NR
TR:TEST5 1 NR NR
TR:TEST6 1 NR NR
TR:TEST7 1 NR NR
BT:000026
FT:000027
Access 2003. I need to import a fixed width text file (example below) and
re-export it and make it match the same format. In the original file,
CONTRACT# is always the same. The reason I need to do is to match the unit
numbers to the appropriate client that I track in my database and export unit
numbers into separate client export files. I’m not sure how to begin with
the import – we can deal with the export later. Since each line has different
column widths, I’d expect to have to read each line, evaluate what type of
line it is and import them into different tables. Do I want the Line
identifiers imports? The spaces are considered separate columns – I don’t
know if that is typical or not but not sure how to handle those. I
appreciate any assistance. LeAnn
FH:CONTRACT# ABC 03/08/07:00:25:42 F N CLIENT NAME
BH:BATCHNUMBER
UI:UNITNUMBER1 UNITNUMBER1
TR:TEST1 1 73 73
TR:TEST2 1 NR NR
TR:TEST3 1 NT NT
TR:TEST4 1 NR NR
TR:TEST5 1 NR NR
TR:TEST6 1 R R
TR:TEST7 1 NR NR
UI:UNITNUMBER2 UNITNUMBER2
TR:TEST1 1 06 06
TR:TEST2 1 NR NR
TR:TEST3 1 NR NR
TR:TEST4 1 R R
TR:TEST5 1 NR NR
TR:TEST6 1 NR NR
TR:TEST7 1 NR NR
UI:UNITNUMBER3 UNITNUMBER3
TR:TEST1 1 51 51
TR:TEST2 1 NR NR
TR:TEST3 1 R R
TR:TEST4 1 NR NR
TR:TEST5 1 NR NR
TR:TEST6 1 NR NR
TR:TEST7 1 NR NR
BT:000026
FT:000027