Probably a simple query question.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please help an Access noob

I have a query where I am trying to select only customers that have a
specific appointment result code. If that customer has the specific
appointment code “SA†I want to get all of the customers records, the “SAâ€
and non “SA†records. How is this done.

Thanks in advance
 
Mark,

What ia the structure of each table involved?

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Not sure exactaly what you mean. The query is only looking at one table with
eight fields. The fields I need to query off (Customer and appt. result) are
text fields but I do have a few number fields for customer amount and
quantity.
 
Mark,

The following returns all the columns for customers having an ApptResult =
"SA". The records returned include "SA" and non-"SA" records.

SELECT * FROM tblCustomer
INNER JOIN (SELECT DISTINCT CustomerID
FROM tblCustomer
WHERE ApptResult = 'SA') As qry1
ON qry1.CustomerID = tblCustomer.CustomerID

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------
 

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

Back
Top