The following lines contain the word 'select', 'insert', 'update' or 'delete':
select 'Y'
INTO X_flag
from dual
where exists(
SELECT pca.po_header_id
FROM po_cwk_associations pca,
per_all_assignments_f paaf,
po_headers_all pha ,
po_lines_all pl
WHERE paaf.assignment_id = p_assignment_id
AND paaf.person_id = pca.cwk_person_id
AND paaf.vendor_id = pha.vendor_id
AND paaf.vendor_site_id = pha.vendor_site_id
AND paaf.job_id = pl.job_id
AND paaf.person_id IS NOT NULL
AND paaf.vendor_id IS NOT NULL
AND paaf.vendor_site_id IS NOT NULL
AND pca.po_header_id = pha.po_header_id
AND pha.po_header_id = pl.po_header_id
AND Nvl(p_effective_date,SYSDATE)
BETWEEN Nvl(paaf.effective_start_date,SYSDATE-1) AND Nvl(paaf.effective_end_date,SYSDATE+1)
);