The following lines contain the word 'select', 'insert', 'update' or 'delete':
procedure insert_one_row(p_rowid rowid);
select distinct meter_id
from eam_meter_readings_interface
where group_id = p_group_id
and process_phase = WIP_CONSTANTS.ML_VALIDATION
and process_status = WIP_CONSTANTS.RUNNING;
select rowid, interface_id
from eam_meter_readings_interface
where group_id = p_group_id
and process_phase = WIP_CONSTANTS.ML_VALIDATION
and process_status = WIP_CONSTANTS.RUNNING;
update eam_meter_readings_interface
set interface_id = wip_interface_s.nextval,
process_status = WIP_CONSTANTS.RUNNING
where group_id = p_group_id
and process_phase = WIP_CONSTANTS.ML_VALIDATION
and process_status = WIP_CONSTANTS.PENDING;
select rowid, interface_id, disable_flag, meter_id, reading_date
from eam_meter_readings_interface
where group_id = p_group_id
and meter_id = p_meter_id
and process_phase = WIP_CONSTANTS.ML_VALIDATION
and process_status = WIP_CONSTANTS.RUNNING
order by reading_date;
update eam_meter_readings_interface
set process_status = WIP_CONSTANTS.ERROR
where rowid = x_rowid;
update eam_meter_readings_interface
set process_phase = WIP_CONSTANTS.ML_INSERTION
where rowid = x_rowid;
update eam_meter_readings_interface
set process_phase = WIP_CONSTANTS.ML_VALIDATION,
process_status = WIP_CONSTANTS.ERROR
where rowid = x_rowid;
update eam_meter_readings_interface
set process_phase = WIP_CONSTANTS.ML_COMPLETE,
process_status = WIP_CONSTANTS.COMPLETED
where rowid = x_rowid;
insert_one_row(x_rowid);
update eam_meter_readings_interface
set process_phase = WIP_CONSTANTS.ML_COMPLETE,
process_status = WIP_CONSTANTS.COMPLETED
where rowid = x_rowid;
procedure insert_one_row(p_rowid rowid) is
begin
insert into eam_meter_readings(
meter_reading_id,
meter_id,
current_reading,
current_reading_date,
reset_flag,
life_to_date_reading,
wip_entity_id,
description,
source_line_id,
source_code,
created_by,
creation_date,
last_update_login,
last_update_date,
last_updated_by,
attribute_category,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
disable_flag
)
select eam_meter_readings_s.nextval,
meter_id,
reading_value,
reading_date,
reset_flag,
life_to_date_reading,
wip_entity_id,
description,
source_line_id,
source_code,
created_by,
creation_date,
last_update_login,
last_update_date,
last_updated_by,
attribute_category,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
disable_flag
from eam_meter_readings_interface
where rowid = p_rowid;
end insert_one_row;
delete from wip_interface_errors
where interface_id in
(select interface_id
from eam_meter_readings_interface
where process_phase = WIP_CONSTANTS.ML_COMPLETE
and group_id = p_group_id
and process_status = WIP_CONSTANTS.COMPLETED);
delete from eam_meter_readings_interface
where process_phase = WIP_CONSTANTS.ML_COMPLETE
and group_id = p_group_id
and process_status = WIP_CONSTANTS.COMPLETED;