For more information, please refer to this announcement explaining best practices for getting answers to questions.
emergency contacts reports
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.