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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exclude records based on table

Status
Not open for further replies.

bernie10

Technical User
Sep 13, 2004
219
US
Hello everyone,
Could somebody remind me how to do the following:

Suppose I have two tables, mytable1 and mytable2, respectively.

My master data:

ID Name
1 Joan
2 Jill
3 Jenny
4 Jack

And a table of entrees I wanted excluded from my query:

ID
2
4


So I want my query results to be:

ID Name
1 Joan
3 Jenny

What would the SQL look like to do this? Thanks for the help.

Collen
 
Code:
select master.ID
     , master.name
  from master
left outer
  join entrees
    on entrees.ID = master.ID
 where entrees.ID is null

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top