Access multiple tables query

Tech

Registered User.
Local time
Today, 10:43
Joined
Oct 31, 2002
Messages
267
this is a tricky one.
Basically I have 3 tables

country
state
city

relationship:

1:m -> country:state
1:m -> state:city

I want to get all the country, state and cities. SELECT * FROM country, state, city

thats fine. But I only want to show unique values, in other words, just want to show unique country values, not duplicates. How can I do this?
 
If you are going to put this on a report, then you can use a single query to pull them all together. However, you will either need to use GROUPING in order to show each country only once (Group on Country) or you can select HIDE DUPLICATES for the controls on the report that you want to only show once.

As for a query, there is no way (at least that I know of) to only show each country once, AND have the other data that is under that country show too.
 

Users who are viewing this thread

Back
Top Bottom