Query Question

K

Karen

I have this query:
SELECT Employee.*, [Exam Schedule].PROGRAMS, [Exam
Schedule].EXAMLOC, [Exam Schedule].CLINIC
FROM Employee INNER JOIN [Exam Schedule] ON Employee.SSNO
= [Exam Schedule].SSNO;
The report is filterd by EXAMLOC. I have to pull all the
individuals from a exam location and then I then need to
take 10% of these individuals and have a label show up on
the report that they need a chest x-ray. All the other
employees outside of this 10% need to have a report that
does not say they need a chest x-ray.

The cxr information is stored in the Nurse table NDATE,
SSNO, CXR, etc.

Any help would be appreciated.

karen
 
B

Brian

Probably one of the better solutions would be to create a
second query, which uses the one you listed as its data
source. If I'm guessing right, you have a field to
populate whether or not they need a chest x-ray or not.
If you do a select/update query, grouped by EXAMLOC, you
can then update that field by using the criteria of 1, 11,
21, etc get 'Chest X-Ray' and the rest get 'No X-ray'.

There are a number of ways to do this, and the decision
will have to be made based on the amount of data your
working with.

Hope this helps.
-----Original Message-----
I have this query:
SELECT Employee.*, [Exam Schedule].PROGRAMS, [Exam
Schedule].EXAMLOC, [Exam Schedule].CLINIC
FROM Employee INNER JOIN [Exam Schedule] ON Employee.SSNO
= [Exam Schedule].SSNO;
The report is filterd by EXAMLOC. I have to pull all the
individuals from a exam location and then I then need to
take 10% of these individuals and have a label show up on
the report that they need a chest x-ray. All the other
employees outside of this 10% need to have a report that
does not say they need a chest x-ray.

The cxr information is stored in the Nurse table NDATE,
SSNO, CXR, etc.

Any help would be appreciated.

karen

.
 

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

Similar Threads


Top