Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to write this without subquery 1

Status
Not open for further replies.

jemminger

Programmer
Jun 25, 2001
3,453
US
hi all,

how can i write this using joins instead of subqueries, so it would work on < v4.1?

(note foo_id = bar_id)
Code:
select * 
from foo_tbl
where foo_id not in (
  select bar_id 
  from bar_tbl
)

i've gotten this so far:

Code:
select *
from foo_tbl
inner join bar_tbl on bar_id = foo_id
where ???

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top