7 replies
by sgt_shultz
by sgt_shultz
by john.a.wills
The import wizard is inadequate to get 4 records into 1 row. As I have 1000s of rows to produce, manual change of the data is not on.
by dryflies
Does your data look like this?
1
George Foreman
1234 west poorman, hollister CA
123.20
2
Janet Jackson
2345 East hollywood, richgirl CA
23500.27
If it does, then you will have to work in two steps. First create a filter that takes your data file and converts it to a format that is edible for M$ access. You can do this in perl, php, VBScript or any of a number of dialogs. The goal of theis filter is to read in four lines, stitch the four lines into one using a delimiter, and then write out one line to a temporary file. in pseudo code it would be:
open input file
open temp file for output
read line into string 1
read line and concatenate to string 1 with a leading comma
read line and cat to string 1 with a leading comma
read line and cat to string 1 with a leading comma.
write string 1 to temp file
repeat until input file is processed (eof)
close input file and output file
Now your data is all on one line per record and you can use the get external data functionality to process the temporary file. you do not have to use a comma, but I would match what is used in the address line to separate the city and state from the street address. I would use the transferText macro command since you can do it programmatically instead of having to click buttons.
Almost done.
Now you may want to split name into first and last or the address might be delimitted differently so that city and state come in as a single field, if for example they are separated spaces like the names are but the street name and number are also separated by spaces. once you have the records into a table you can either concatenate fields together to create a new field (use build to enter the following.)
fieldone: [testable]![streetnum]+" "+[testable]![streetname]
or you can split one field into two by using the VB string functions.
by dryflies
not enough room, had to add comment. :-)
Watch your data because if some of the entries have middle names and others don't, you may end up with trouble. but eventually, by splitting and combining you will end up with the field structure you desire.
please rate my answer. if there is something you do not understand let me know.
by john.a.wills
The first stage could probably be carried out with something we have here, but we overcame the problem by adjustment of the program producing the file.
by john.a.wills
This discussion is closed to new replies.
Trending Software posts
Sort by Trending