Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comparing two separate tables
Message
De
08/11/1996 13:54:48
 
 
À
08/11/1996 13:30:50
Tony Catalano
Bennett and Williams Eci
Columbus, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00011841
Message ID:
00011848
Vues:
32
>I'm stuck. For the past month I have been trying to compare the contents
>open database gwdata
>use pam93b in 0
>use pam93a in 0
> copy structure to output
> add table output
> use output in 0
>dimension Tlist[1,10]
>
>select pam93a
>go 1
>do while .T.
> if eof ()
> exit
> endif
> scatter to Tlist
> dimension Clist[1,10]
> select pam93b
> scan
> scatter to clist
> for n = 1 to 10
> set exact on
> mv=ascan(Tlist, Clist[1,n],1)
> if mv = 0
> select output
> append from array Tlist
> skip
> exit
> endif
> endfor
> release CList
> endscan
>release all
>select pam93a
>skip
>loop
>enddo
>
You must compare record by record and field by field, else you go to multiply yield results. Actually I guess you have problem with table design. Any table should have primary key (unique), which supposed to be true identifier for comparison. In your program your compare first record of first table with ALL records from second and even by accidental fields. It's really not reliable at least.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform