select ... where (a.fld2a=b.fld2b) AND (trim(a.fld1a)=trim(b.fld1b))and
select ... where (trim(a.fld1a)=trim(b.fld1b)) AND (a.fld2a=b.fld2b)really ought to give the same results & the results should be consistent regardless of setting ansi (I know setting it to on affects the results & leads to consistent results, but even if off the results should be consistent).