>Ah I see.
>So if i want to use a subquery how can I put the == into the following
>
>SELECT field1 FROM table1 WHERE ALLTRIM(field1) in (sele ALLTRIM(field1) FROM table2) && gives two rows instead of none
>
>
>Thanks
>carmel
No I didn't mean the subquery. Check my first reply for method 2. == is like inline 'set ansi'.
Subquery prevents duplicates but more tricky to build for correct results. To me it sounds you don't need to check if duplicates exists or not. If you want to check add distinct (distinct slows down a lot).
Cetin