crystalclear01
MIS
crystalclear01 (MIS) Jan 17, 2005
All, I have a brain wrecker...
CR 9 Oracle DB, 1 table: CHART. Looks like this:
CHART# SEEN BY CLASS
12345 Jack Doctor
12345 Jill Nurse
11445 Nancy Doctor
56487 Joe Doctor
46898 Jack Doctor
46898 Diane Nurse
67678 Jill Nurse
Trying to count with a twist:
1. If the patient has ben seen only by a doctor, give the doctor credit.
2. If the patient has been seen only by a nurse, give the nurse credit.
3 If the patient has been seen both by a Doctor and a Nurse, give the Nurse credit
So in the above scenario the count would be as follows:
JACK: 0
JILL: 2
NANCY: 1
JOE: 1
Diane: 0
(The real table is about 12,000)
I've tried maybe splitting the table for duplicates or inserting a running total. no luck so far.
Any help would be greatly appreciated.
All, I have a brain wrecker...
CR 9 Oracle DB, 1 table: CHART. Looks like this:
CHART# SEEN BY CLASS
12345 Jack Doctor
12345 Jill Nurse
11445 Nancy Doctor
56487 Joe Doctor
46898 Jack Doctor
46898 Diane Nurse
67678 Jill Nurse
Trying to count with a twist:
1. If the patient has ben seen only by a doctor, give the doctor credit.
2. If the patient has been seen only by a nurse, give the nurse credit.
3 If the patient has been seen both by a Doctor and a Nurse, give the Nurse credit
So in the above scenario the count would be as follows:
JACK: 0
JILL: 2
NANCY: 1
JOE: 1
Diane: 0
(The real table is about 12,000)
I've tried maybe splitting the table for duplicates or inserting a running total. no luck so far.
Any help would be greatly appreciated.