English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How can i get a query to exclude a name if it appears more than once? I have a list of hospitals with various consultants and I need a query to tell me just the hospitals that occur and I only want each hospital to show once.... very hard to explain!

2007-03-27 02:45:34 · 5 answers · asked by Anonymous in Computers & Internet Programming & Design

5 answers

Create new query, select "Find Duplicates Query Wizard"
Choose table (or another query) and fields you want.
Follow wizard steps.

This query lists values 2 and more duplicates.
Open new query in Design View.
Change the value >2 to >1
Save.

Excluding a name:
Open query in Design View.
Set Criteria as
=Not "xyz"

(xyz is excluded name.)

2007-03-27 03:12:51 · answer #1 · answered by blgsyr 3 · 0 0

SELECT Distinct [hospital name]
FROM [hospital table]

As long as the names are exactly alike you won't return duplicates. If the names differ at all (Aside from letter case) it will return duplicates.

2007-03-27 04:01:09 · answer #2 · answered by Noah H 1 · 0 0

select distinct....

or a left join

2007-03-27 02:52:50 · answer #3 · answered by Mark J 7 · 2 0

check http://msaccess.batcave.net

2007-03-27 06:04:09 · answer #4 · answered by Eranga D 2 · 0 0

sorry dont know.

2007-03-27 02:48:37 · answer #5 · answered by Anonymous · 0 0

fedest.com, questions and answers