Query Question

  • Thread starter Thread starter Galsaba
  • Start date Start date
G

Galsaba

I have two tables.
One is a list of doctors:
Table 1: Dr name | Town | Speciality

The other one is zip codes that each doctor covers.

For some doctors there is no zip code connected.

How can I write a query that shows just those doctors that do not have any zip
code
..
Thanks,

Joe
 
Joe,

There's a wizard to do just that!

1. Select the [Queries] tab from the Database window.
2. Click New. The New Query dialog box is displayed.
3. Select [Find Unmatched Query Wizard], and click OK. The [Find Unmatched
Query Wizard] is displayed.
4. Follow the prompts to create the query.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 
Include both tables in your query and join the primary of the doctor table with
the foreign key of the zipcode table. Click on the join line and change the join
type to the one that says include all records from the doctor table. In the
zipcode field, add the criteria:
Is Null
 
I have two tables.
One is a list of doctors:
Table 1: Dr name | Town | Speciality

The other one is zip codes that each doctor covers.

For some doctors there is no zip code connected.

How can I write a query that shows just those doctors that do not have any zip
code

You can use the "Unmatched Query Wizard".

Do you have a Primary Key on this table? What if you had two doctors
who happened to have the same name - could you distinguish them?
 
Back
Top