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 strongm 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
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.
 
Give this a try.

Select S.titleid, C.countryid from Sales S
right outer join Country C ON S.countryid = C.countryid
where S.countryid IS NULL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top