Hi shibu,
I don't know much about Oracle, but it looks like you are trying to achieve
something like this;
select E1.ename from emp E1 inner join (select sal , comm from emp where
ename ='SMITH') E2
on E1.sal=E2.sal AND E1.comm=E2.comm
Hope that helps,
Dave
-----Original Message-----
From: Shibu [mailto:basher.[Email Address Removed] 17 April 2002 12:45
To: [Email Address Removed] query help!!
Hi all...........
The below given query works fine in Oracle .Can anyone tell me how to
write a corresponding query in sqlserver.
In Oracle we can use two fields before and after IN clause but it's not
working in sqlserver
select ename from emp
where (sal,comm) in (select sal , comm from emp where ename ='SMITH');
ENAME
----------
SMITH
Thanks in Advance
shibu
MS Sql Server LazyDBA home page