Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing two separate tables
Message
From
08/11/1996 13:54:48
 
 
To
08/11/1996 13:30:50
Tony Catalano
Bennett and Williams Eci
Columbus, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00011841
Message ID:
00011848
Views:
27
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform