Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Subject:What Method do you use to pull data of an orcurrence when 2people see the same
Hello,
I Require The following output : output 3
D_name Patie Patie Sv_Date -------- ----- ----- --------- Mr Hussein f4221 f4221 21-AUG-99 Mr Hussein f4221 f4221 17-SEP-99 Mr Hussein f4221 f4221 18-SEP-99 Miss Brown f4221 f4221 24-AUG-99
I could do the following
Select Appointment.D_name,
Appointment.Patient_no,Patient.Patient_no,
Appointment.Sv_date
from Appointment, Patient
where Appointment.Patient_no = Patient.Patient_no and
Appointment.D_name ='Mr Hussein' or Appointment.D_name ='Miss Brown' and
Appointment.Sv_date Between to_date('01-AUG-99') and
to_date('30-SEP-99');
I can not use (and) between the two dentist names as this will return no
records
But this pulls in the record of patient M1321
D_name Patie Patie Sv_Date ------------- ------ ------ ------------- Miss Brown f4221 f4221 24-AUG-99 Miss Brown M1321 M1321 30-SEP-99 Mr Hussein f4221 f4221 21-AUG-99 Mr Hussein f4221 f4221 17-SEP-99 Mr Hussein f4221 f4221 18-SEP-99 Miss Brown M1321 M1321 30-SEP-99 who was seen by Miss Brown only
I can not use (and) between the two dentist names as this will return no records
I have had a few suggestion but i have found they produce a similar output.
Any suggestion on what method I need to achieve this result will be appreciated.
Thank You very much,
Jas Suri, Received on Fri Dec 10 1999 - 05:30:33 CST