SELECT DISTINCT A.FIELD1, A.FIELD2 AS MYFIELD1, B.FIELD1, 'TEST' AS MYFIELD2 FROM TABLE1 A JOIN TABLE2 B ON A.FIELD3=B.FIELD2 AND A.FIELD4 IN (1234,2345...max 26 elements) OR A.FIELD4 IN (...) OR ...attention to use !DELETED("TABLE1") because it refer to the TABLE1 workarea, not to the A
aList[1]=1234 aList[2]=2345 .... or a fill loop next use : SELECT DISTINCT A.FIELD1, A.FIELD2 AS MYFIELD1, B.FIELD1, 'TEST' AS MYFIELD2 FROM TABLE1 A JOIN TABLE2 B ON A.FIELD3=B.FIELD2 AND ASCAN(aList,A.FIELD4)>0for large list ( see MIKE Y.) WHERE A.FIELD4 IN (SELECT ... ) is best because VFP build a temporary index ( overhead is gained on search )