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

Joined Tables Problem

Status
Not open for further replies.

Silvinho

Programmer
Jul 9, 2001
58
0
0
GB
I’ve been having great difficulty with this joined table problem. Ill explain the database to start with:

Table called Country
Table called Titles
Table called Sales

The sales table is linked to both the Country table and the Titles table

Each title can be sold in various countries adding a record in the Sales table. The country is linked to this record in the Sales table via the CountryID in the Country Table.

There are say 30 countries available. If TitleID 5 is sold in 4 different counties that leaves 26 countries still available. What I need to do is list these available countries but there just doesn’t seem to be a way; I can’t filter out all the other titles. Can anyone help?

I got the query working within access but I need to display the information in various asp pages using the TitleID variable. I can only get it working with a fixed value for TitleID in Access.
 
Hi

You not say how and why you want to use the extracted data, but:

How about:

"SELECT CountryId FROM Countries WHERE CountryId NOT IN (SELECT CountryId FROM CountryId);"

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
kenneth.reaySPAMNOT@talk21.com
remove SPAMNOT to use
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top