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

Confusing SQL query 1

Status
Not open for further replies.

int3grate

Programmer
Sep 23, 2006
2
US
I'm trying to construct this query using sql in microsoft access, and I'm having a little trouble finding a way to do it.

I have an items-sold table that looks similar to this:
Code:
item_name                             department
-------------------------------------------------
Geo positioning system                Navigation
Map measure                           Navigation
Geo positioning system                Books
Sextant                               Books
Pocket knife-Nile                     Books
Pocket knife-Nile                     Clothes
I need build a query that list departments that have not sold a Geo position system. Any ideas?
 


Hi,
[code[
SELECT department
FROM `Data$`
WHERE department Not IN
(
SELECT department
FROM `D:\My Documents\vba\query stuff B`.`Data$` `Data$`
WHERE item_name='Geo positioning system'
)
[/code]

Skip,

[glasses] [red][/red]
[tongue]
 
Thanks Skip, thats exactly what I was looking for!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top