The following lines contain the word 'select', 'insert', 'update' or 'delete':
| Select statement using the given employee matching criteria in the where clause. |
*===================================================================================*/
l_query_stmt := 'select distinct(person_id) from PER_ALL_PEOPLE_F '||l_where_clause;
select lookup_code
from ap_lookup_codes lu
where lu.lookup_type = 'OIE_AUTO_AUDIT_REASONS'
and lu.lookup_code = p_lookup_code
and NVL(lu.enabled_flag,'Y') = 'Y'
AND TRUNC(SYSDATE)
BETWEEN TRUNC(NVL(lu.START_DATE_ACTIVE,SYSDATE))
AND TRUNC(NVL(lu.INACTIVE_DATE,SYSDATE));
SELECT auto_audit_id
FROM ap_aud_auto_audits
WHERE employee_id = p_emp_rec.person_id
AND audit_reason_code = p_audit_rec.audit_reason_code
AND end_date is NULL;