Pull contact data from this record, this record does not have EMPLID for the emergency contact (though they may very well have one). EMPLID is the student's ID number. |
For address, if field SAME_ADDRESS_EMPL is Y then use the address type in field ADDRESS_TYPE to pull that address for the EMPLID. |
For address, if field SAME_PHONE_EMPL is Y then use the phone type in field PHONE_TYPE to pull that phone for the EMPLID. |
The parent record (EMERGENCY_CONTACT) has HR row level security attached, do not use in query. |