Select DISTINCT b.cfk1, b.cfk2, a.ctype; FROM vcf!many b ; INNER Join vcf!one a ON b.cfk1 = a.cid; WHERE (b.namount1<>0 OR b.namount2<>0 OR b.namount3<>0)=.T. and a.ctype In ("F","8")If exists an index on (b.namount1<>0 OR b.namount2<>0 OR b.namount3<>0), this could be fast, if has a good selectivity, but I don't know if results are correct