Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Subject:What Method do you use to pull data of an orcurrence when 2people see the same

Subject:What Method do you use to pull data of an orcurrence when 2people see the same

From: Jaswinder Suri <Jaswinder.Suri_at_msdw.com>
Date: Fri, 10 Dec 1999 11:30:33 +0000
Message-ID: <3850E458.50F470B0@msdw.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US