Using the find command

make

Member
Hi there !

I have create a temp table , named tt, with a field called Value.
Now i want to "find" each value of my tt in another table.

I tried :

for each tt :
find xaufpos where xaufpos.aarnr = tt.aarnr.
end.

But the complier told me : Error , there a more than one records in xaufpos.

Waht can i do ?

Greets
 

Crittar

Member
If you want to find each matching record in your table then use:

for each tt no-lock,
each xaufpos where xaufpos.aarnr = tt.aarnr no-lock:

end.


If you only wish to find the first occurrence of a match then use:

for each tt no-lock:

find first xaufpos where xaufpos.aarnr = tt.aarnr no-lock.

end.
 
if you use find without first/next/prev/last progress check's if it can find a unique record. If progress finds another record you get error: there a more than one records in ...
 
Top