The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT wfa.name AGENT,
wfs.name SYSTEM
FROM wf_systems wfs,
wf_agents wfa
WHERE wfa.name not in ('WF_ERROR', 'WF_DEFERRED')
and wfa.name = nvl(p_agent, wfa.name)
and wfa.status = 'ENABLED'
and wfa.direction = 'IN'
and wfa.system_guid = wfs.guid
and upper(wfa.queue_handler) = 'WF_EVENT_QH'
and wfa.name like 'WF%'
and wfa.status = 'ENABLED'
and wfs.name = nvl(p_system, wfs.name);
SELECT a.name into queName
FROM wf_agents a,
wf_systems s
WHERE a.direction = 'OUT'
AND a.status = 'ENABLED'
AND a.queue_handler = 'WF_EVENT_QH'
AND a.system_guid = s.guid
AND s.name = l_sys_name
AND a.name = l_agent_name;