I have two tables a and b. A contains numbers 1-10, b contains numbers: 1,1,2,3,3,4,5,6,7,8,9,10.
I want to compare the records in a against the records in b. If they match then *do something.
so far I have this however it will not append if there are multiple instances of the same number in b.
SELECT a
GO TOP
DO WHILE NOT EOF()
nrecno=a.numa
SELECT b
SCAN for b.numb=nrecno
m.numb=nrecno
SELECT b
GO bottom
APPEND BLANK
GATHER MEMVAR
endscan
SELECT a
SKIP
ENDDO
The numbers appended at the end are 1,2,3,4,5,6,7,8,9,10
Any suggestions
I want to compare the records in a against the records in b. If they match then *do something.
so far I have this however it will not append if there are multiple instances of the same number in b.
SELECT a
GO TOP
DO WHILE NOT EOF()
nrecno=a.numa
SELECT b
SCAN for b.numb=nrecno
m.numb=nrecno
SELECT b
GO bottom
APPEND BLANK
GATHER MEMVAR
endscan
SELECT a
SKIP
ENDDO
The numbers appended at the end are 1,2,3,4,5,6,7,8,9,10
Any suggestions