The following lines contain the word 'select', 'insert', 'update' or 'delete':
select attribute1, attribute2, attribute3, attribute4
from fii_system_event_log log
where log.event_type = 'DNRM:FII_PA_REVENUE_F'
and log.event_object = 'EDW_PROJ_TASK_LTC.DENORM_TASK_ORG_FK'
and log.status = 'PROCESSING';
update fii_system_event_log log
set status = 'PROCESSING'
where log.event_type = 'DNRM:FII_PA_REVENUE_F'
and log.event_object = 'EDW_PROJ_TASK_LTC.DENORM_TASK_ORG_FK'
and log.status = 'READY';
delete from fii_system_event_log log
where log.event_type = 'DNRM:FII_PA_REVENUE_F'
and log.event_object = 'EDW_PROJ_TASK_LTC.DENORM_TASK_ORG_FK'
and log.status = 'PROCESSING'
and log.event_id not in
(
select max( event_id )
from fii_system_event_log log
where log.event_type = 'DNRM:FII_PA_REVENUE_F'
and log.event_object = 'EDW_PROJ_TASK_LTC.DENORM_TASK_ORG_FK'
and log.status = 'PROCESSING'
);
update fii_system_event_log log
set (attribute2, attribute3, attribute4) =
(
select to_char(task.task_pk_key), task.denorm_task_org_fk, to_char(org.organization_pk_key)
from edw_proj_task_ltc task,
edw_orga_org_ltc org
where log.attribute1 = task.task_pk
and task.denorm_task_org_fk = org.organization_pk
)
where log.event_type = 'DNRM:FII_PA_REVENUE_F'
and log.event_object = 'EDW_PROJ_TASK_LTC.DENORM_TASK_ORG_FK'
and log.status = 'PROCESSING';
update fii_pa_revenue_fstg fstg
set project_org_fk =
(
select denorm_task_org_fk
from edw_proj_task_ltc task
where fstg.project_fk = task.task_pk
)
where fstg.collection_status = 'READY'
and fstg.edw_record_type = 'ORACLE';
update fii_pa_revenue_fstg fstg
set project_org_fk =
(
select attribute3
from fii_system_event_log log
where log.event_type = 'DNRM:FII_PA_REVENUE_F'
and log.event_object = 'EDW_PROJ_TASK_LTC.DENORM_TASK_ORG_FK'
and log.status = 'PROCESSING'
and fstg.project_fk = log.attribute1
)
where collection_status = 'READY'
and edw_record_type = 'ORACLE'
and project_fk in
(
select attribute1
from fii_system_event_log
where event_type = 'DNRM:FII_PA_REVENUE_F'
and event_object = 'EDW_PROJ_TASK_LTC.DENORM_TASK_ORG_FK'
and status = 'PROCESSING'
);
update fii_pa_revenue_f fact
set fact.project_org_fk_key = to_number( c.attribute4 )
where fact.project_fk_key = to_number( c.attribute2 );
delete from fii_system_event_log
where event_type = 'DNRM:FII_PA_REVENUE_F'
and event_object = 'EDW_PROJ_TASK_LTC.DENORM_TASK_ORG_FK'
and status = 'PROCESSING';