Okay...here's the problem:
I have a simple fixed length text file...that looka a bit like this....
John Adams 1234 Main Street Anywhere TX
John William Adams 9876 Walnut Ave Some Town TX
The problem:
in order to import it into an existing database I have, I want to convert it to an ASCII comma delimmted file..with a bit of a twist....as far as the name, my database carries the name as three different fields...First Name Middle Init
and Last Name and carries City and state as two different fields as well....
in other words, the names I need exported as:
"John","","Adams"
"John","W","Adams"
and, the addresses need to be:
"Anywhere","TX"
"Some Town","TX"
etc
the problem is how do I do this manipulation since I can't really use white space as an indicator and not all names have a middle name or initial...and, some cities are two words instead of one, etc...
anyone have any ideas on whether awk or perl would handle this better? or any other text manipulation tools that would simply this?
I would do it manually in Access but I have a TON of records to do, etc....
any help would be appreciated...thanks
Scooter6
I have a simple fixed length text file...that looka a bit like this....
John Adams 1234 Main Street Anywhere TX
John William Adams 9876 Walnut Ave Some Town TX
The problem:
in order to import it into an existing database I have, I want to convert it to an ASCII comma delimmted file..with a bit of a twist....as far as the name, my database carries the name as three different fields...First Name Middle Init
and Last Name and carries City and state as two different fields as well....
in other words, the names I need exported as:
"John","","Adams"
"John","W","Adams"
and, the addresses need to be:
"Anywhere","TX"
"Some Town","TX"
etc
the problem is how do I do this manipulation since I can't really use white space as an indicator and not all names have a middle name or initial...and, some cities are two words instead of one, etc...
anyone have any ideas on whether awk or perl would handle this better? or any other text manipulation tools that would simply this?
I would do it manually in Access but I have a TON of records to do, etc....
any help would be appreciated...thanks
Scooter6