Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mdanwerali
Starting Member
30 Posts |
Posted - 2002-11-22 : 06:22:37
|
| Hi,Please can u suggest me how to write this query?Select * from empmasterwhere (empno,deptno) in (select empno,deptno from deptmaster)this is a successfully query in Oracle, but how to write the same query in Sql?md anwer ali |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-11-22 : 06:29:21
|
| You can concatenate as strings into a single field (bad idea on anything but smallk tables) orSelect * from empmaster where exists (select * from deptmaster where empmaster.empno = deptmaster.empno and empmaster.deptno = deptmaster.deptno)orselect distinct empmaster.* from empmaster, deptmaster where empmaster.empno = deptmaster.empno and empmaster.deptno = deptmaster.deptno==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy.Edited by - nr on 11/22/2002 06:30:40 |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
|
|
|
|
|