I'm trying to do a query in sql*server that I know how to do in oracle ... can someone tell me the equivalent in sql*server. In Oracle the query would be:
select fieldName1, fieldName2
from Table1
where fieldName1 in (select fieldName1
from Table2)
or
select fieldName1, fieldName2
from Table1
where exists (select 'x'
from Table2
where Table1.fieldName1 = Table2.fieldName2)
My Oracle is very rusty so I'm not absolutely positive of the syntax in the second example but hopefully you get the idea.
select fieldName1, fieldName2
from Table1
where fieldName1 in (select fieldName1
from Table2)
or
select fieldName1, fieldName2
from Table1
where exists (select 'x'
from Table2
where Table1.fieldName1 = Table2.fieldName2)
My Oracle is very rusty so I'm not absolutely positive of the syntax in the second example but hopefully you get the idea.