scooter6
2005-12-22 16:44:38 UTC
I have a dbase file that has a field called 'zip' - there are (can be)
multiple instances of a zip code.
What I'm trying to do is create another file that adds the enumeration
of how many times the zip code was in this dbf file.
For instance, I have a file called workfile.dbf, and it looks like
this
Field Names:
Zip Message
------- -------------
10001 100A
10002 200A
10002 300A
10003 400A
10003 500A
10003 600A
I am trying to write a program that creates a new dbf file called
sqwork and it needs to look like this:
Field Name:
Zipseqno Message
------------- -------------
100011 100A
100021 200A
100022 300A
100031 400A
100032 500A
100033 600A
As you can see, the file I want to create needs to have the zip code
from the first file and have the 'occurence' added to the end of it -
so in my example above, there are three (3) instances of zip code 10003
- so the file I need created has zipseqno 100031, 100032 & 100033
Can anyone tell me how I can accomplish this with a .prg ??
I am using dBase III on Unix
thanks
Scott
multiple instances of a zip code.
What I'm trying to do is create another file that adds the enumeration
of how many times the zip code was in this dbf file.
For instance, I have a file called workfile.dbf, and it looks like
this
Field Names:
Zip Message
------- -------------
10001 100A
10002 200A
10002 300A
10003 400A
10003 500A
10003 600A
I am trying to write a program that creates a new dbf file called
sqwork and it needs to look like this:
Field Name:
Zipseqno Message
------------- -------------
100011 100A
100021 200A
100022 300A
100031 400A
100032 500A
100033 600A
As you can see, the file I want to create needs to have the zip code
from the first file and have the 'occurence' added to the end of it -
so in my example above, there are three (3) instances of zip code 10003
- so the file I need created has zipseqno 100031, 100032 & 100033
Can anyone tell me how I can accomplish this with a .prg ??
I am using dBase III on Unix
thanks
Scott