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 |
|
khalik
Constraint Violating Yak Guru
443 Posts |
Posted - 2002-05-03 : 05:06:53
|
| hi i was look for something in sql which can do like thisselect * from bill where (owner,id) in (select distinct owner,id from calls)thanks gurus...======================================Ask to your self before u ask someone |
|
|
jackstow
Posting Yak Master
160 Posts |
Posted - 2002-05-03 : 05:25:45
|
| This might do the trick;select distinct bill.* from bill inner joincalls onbill.id = calls.idwherecalls.owner is not nullandcalls.id is not nullEdited by - jackstow on 05/03/2002 05:30:03 |
 |
|
|
khalik
Constraint Violating Yak Guru
443 Posts |
Posted - 2002-05-03 : 06:39:38
|
| thanks jackstownot clear how does it works....calls.owner is not null and calls.id is not null does not mean calls.owner=bill.owner======================================Ask to your self before u ask someone |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-05-03 : 07:44:44
|
| SELECT DISTINCT bill.* FROM bill INNER JOIN calls ON bill.id = calls.id AND bill.owner = calls.owner |
 |
|
|
|
|
|