>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