Exclude not working

T

terryc

I'm trying to exclude the name of 1 physician from a list of many physicians.
I have tried <> and Not like Dr John Doe. With either, I still am getting Dr
John Doe in the list.
 
D

Dale Fye

Post your SQL string.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
T

terryc

I'm sorry, but you're way over my head. I was putting <> under criteria in a
query window.
 
J

John W. Vinson

Open the query in design view. Select View... SQL from the menu. Copy and
paste the text (all of it) into a message here.

We can't see your screen and have no idea what your table or your query looks
like.
 
T

terryc

Here's the SQL:

SELECT DISTINCTROW [RESIDENT ADMIT INFO].SSN, [RESIDENT ADMIT
INFO].PrintedName, DOCTORS.[Last Seen], DOCTORS.[Due Date], DOCTORS.AptDate,
DOCTORS.Notes, [RESIDENT MEDICAL INFO].Physician
FROM ([RESIDENT ADMIT INFO] INNER JOIN [RESIDENT MEDICAL INFO] ON [RESIDENT
ADMIT INFO].SSN = [RESIDENT MEDICAL INFO].SSN) INNER JOIN DOCTORS ON
[RESIDENT ADMIT INFO].SSN = DOCTORS.SSN
WHERE ((([RESIDENT MEDICAL INFO].Physician)<>"Dr. Don Rutherford DO"))
ORDER BY DOCTORS.[Due Date];
 
J

John Spencer (MVP)

As an experiment try changing the criteria to
NOT LIKE "*rutherford*" and see if that excludes the record.

If it does then try
Like "*Rutherford*"
and examine the record(s) closely to see if there is an extra space in the
physician field or no period after Dr. or other difference in the name.



John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Here's the SQL:

SELECT DISTINCTROW [RESIDENT ADMIT INFO].SSN, [RESIDENT ADMIT
INFO].PrintedName, DOCTORS.[Last Seen], DOCTORS.[Due Date], DOCTORS.AptDate,
DOCTORS.Notes, [RESIDENT MEDICAL INFO].Physician
FROM ([RESIDENT ADMIT INFO] INNER JOIN [RESIDENT MEDICAL INFO] ON [RESIDENT
ADMIT INFO].SSN = [RESIDENT MEDICAL INFO].SSN) INNER JOIN DOCTORS ON
[RESIDENT ADMIT INFO].SSN = DOCTORS.SSN
WHERE ((([RESIDENT MEDICAL INFO].Physician)<>"Dr. Don Rutherford DO"))
ORDER BY DOCTORS.[Due Date];


John W. Vinson said:
Open the query in design view. Select View... SQL from the menu. Copy and
paste the text (all of it) into a message here.

We can't see your screen and have no idea what your table or your query looks
like.
 
T

terryc

Thanks John. "not like" worked.

John Spencer (MVP) said:
As an experiment try changing the criteria to
NOT LIKE "*rutherford*" and see if that excludes the record.

If it does then try
Like "*Rutherford*"
and examine the record(s) closely to see if there is an extra space in the
physician field or no period after Dr. or other difference in the name.



John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Here's the SQL:

SELECT DISTINCTROW [RESIDENT ADMIT INFO].SSN, [RESIDENT ADMIT
INFO].PrintedName, DOCTORS.[Last Seen], DOCTORS.[Due Date], DOCTORS.AptDate,
DOCTORS.Notes, [RESIDENT MEDICAL INFO].Physician
FROM ([RESIDENT ADMIT INFO] INNER JOIN [RESIDENT MEDICAL INFO] ON [RESIDENT
ADMIT INFO].SSN = [RESIDENT MEDICAL INFO].SSN) INNER JOIN DOCTORS ON
[RESIDENT ADMIT INFO].SSN = DOCTORS.SSN
WHERE ((([RESIDENT MEDICAL INFO].Physician)<>"Dr. Don Rutherford DO"))
ORDER BY DOCTORS.[Due Date];


John W. Vinson said:
Open the query in design view. Select View... SQL from the menu. Copy and
paste the text (all of it) into a message here.

We can't see your screen and have no idea what your table or your query looks
like.

I'm sorry, but you're way over my head. I was putting <> under criteria in a
query window.

:

Post your SQL string.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.



:

I'm trying to exclude the name of 1 physician from a list of many physicians.
I have tried <> and Not like Dr John Doe. With either, I still am getting Dr
John Doe in the list.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top