The following lines contain the word 'select', 'insert', 'update' or 'delete':
procedure insert_row(
p_row_id IN OUT varchar2,
p_defined_balance_id number,
p_input_value_id number,
p_backpay_set_id number) is
cursor c1 is
select rowid
from pay_backpay_rules
where backpay_set_id = P_BACKPAY_SET_ID
and defined_balance_id = P_DEFINED_BALANCE_ID
and input_value_id = P_INPUT_VALUE_ID;
insert into pay_backpay_rules(
defined_balance_id,
input_value_id,
backpay_set_id)
values (p_defined_balance_id,
p_input_value_id,
p_backpay_set_id);
end insert_row;
procedure delete_row(p_row_id varchar2) is
begin
delete from pay_backpay_rules
where rowid = chartorowid(P_ROW_ID);
end delete_row;
select *
from pay_backpay_rules
where rowid = chartorowid(P_ROW_ID)
FOR UPDATE OF BACKPAY_SET_ID NOWAIT;
procedure update_row(
p_row_id varchar2,
p_defined_balance_id number,
p_input_value_id number,
p_backpay_set_id number) is
begin
update pay_backpay_rules
set defined_balance_id = P_DEFINED_BALANCE_ID,
input_value_id = P_INPUT_VALUE_ID,
backpay_set_id = P_BACKPAY_SET_ID
where rowid = chartorowid(P_ROW_ID);
end update_row;
procedure std_insert_checks(
p_backpay_set_id number,
p_balance_type_id number,
p_input_value_id number) is
l_null varchar2(1);
select null
into l_null
from sys.dual
where not exists (
select null
from pay_backpay_rules br,
pay_defined_balances db
where br.backpay_set_id = P_BACKPAY_SET_ID
and br.defined_balance_id = db.defined_balance_id
and db.balance_type_id = P_BALANCE_TYPE_ID
and br.input_value_id = P_INPUT_VALUE_ID);
end std_insert_checks;
select null
into l_null
from sys.dual
where not exists (
select bf1.input_value_id, bf2.balance_type_id
from pay_backpay_rules br,
pay_defined_balances db,
pay_balance_feeds bf1,
pay_balance_feeds bf2
where bf1.balance_type_id = db.balance_type_id
and db.defined_balance_id = br.defined_balance_id
and br.input_value_id = bf2.input_value_id
and br.backpay_set_id = P_BACKPAY_SET_ID
group by bf1.input_value_id, bf2.balance_type_id
having count(0) > 1);