You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

emergency contacts reports

Received Response
22
Views
4
Comments

Summary:


Hello,


I've created report to get emergency contacts for employee below this only part of it. I'm getting error message that subquery return more then one row.

(SELECT PHONE_NUMBER

   FROM

      PER_PHONES PH,

      PER_CONTACT_RELSHIPS_F PR,

      PER_ALL_PEOPLE_F PPF

    where PR.PERSON_ID = PPF.PERSON_ID AND

       PR.CONTACT_PERSON_ID=PH.PERSON_ID AND

     PH.PHONE_TYPE in ('H1', 'HM') AND

     PR.PRIMARY_CONTACT_FLAG='Y' AND

       PR.EMERGENCY_CONTACT_FLAG ='Y'AND

        PR.CONTACT_TYPE='EMRG' AND :PEFFECTIVEDATE BETWEEN

      DATE_FROM AND nvl(DATE_TO, sysdate+1000)) PHONE_NUMBER, 

After investigation I've found that for some employees there two Emergency Phones configured. Please advise how to modify report to get emergency contacts. I've tried to use And ROWNUM=1 report return same phone number for all employees.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!