English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i have a table with the area codes and the other three digits example
405 area code
585 second three digits
8888 last 4 digits
the last 4 digits are unspecified, im trying to build a list of all possible phone numbers in the state of alabama
i have a field called npa for the area code and nxx for the other 3 digits and my porblem is how can i create 10000 (0000 -9999)
other records for each different npa and nxx? i think you will have to have a good idea of my table in your head to understand what i am looking for. also is there anyway of undoing a zap? or recovering the dbf?
if you could type any script that i need or that could be helpful please feel free to add it

2006-08-17 08:35:20 · 1 answers · asked by daniel e 3 in Computers & Internet Programming & Design

1 answers

I'm rusty with VFP but in psuedo-code here it is.
You want 3 nested loops

The first thing is to get a cursor (cAC) that is just the area codes then scan that cursor and for each time through, get a cursor of all nxx's for the current area code. The do 10000 updates in a loop of x from 0 to 10000.


Scan cAC
select nxx from table where npa = cAC.npa into cNXX
Scan cNXX
(not sure of the vfp loop syntax so this might be VB)
For A = 0 to 10000
insert into table values(cAC.npa, cNXX.NXX,A)
Next A
endscan
endscan

As for the other technical aspects of zap and dbfs, I'm sorry I don't know. I'm a VB guy who had to help out with VFP for a project once.

2006-08-17 11:57:05 · answer #1 · answered by Anonymous · 0 0

fedest.com, questions and answers