The following lines contain the word 'select', 'insert', 'update' or 'delete':
select ecr.classification_id
from pay_ele_classification_rules ecr
where ecr.element_set_id = p_element_set_id
and ecr.classification_id = p_classification_id
and not exists
(select null
from pay_element_type_rules etr
where etr.element_set_id = ecr.element_set_id
and etr.element_type_id = p_element_type_id
and etr.include_or_exclude = 'E');
insert into pay_element_type_rules
(element_type_id,
element_set_id,
include_or_exclude,
last_update_date,
last_updated_by,
last_update_login,
created_by,
creation_date)
select
p_element_type_id,
p_element_set_id,
'I',
trunc(sysdate),
0,
0,
0,
trunc(sysdate)
from sys.dual
where not exists
(select null
from pay_element_type_rules etr
where etr.element_set_id = p_element_set_id
and etr.element_type_id = p_element_type_id);
delete from pay_element_type_rules etr
where etr.element_set_id = p_element_set_id
and etr.element_type_id = p_element_type_id
and etr.include_or_exclude = 'E';
insert into pay_element_type_rules
(element_type_id,
element_set_id,
include_or_exclude,
last_update_date,
last_updated_by,
last_update_login,
created_by,
creation_date)
select
p_element_type_id,
p_element_set_id,
'E',
trunc(sysdate),
0,
0,
0,
trunc(sysdate)
from sys.dual
where not exists
(select null
from pay_element_type_rules etr
where etr.element_set_id = p_element_set_id
and etr.element_type_id = p_element_type_id);
delete from pay_element_type_rules etr
where etr.element_set_id = p_element_set_id
and etr.element_type_id = p_element_type_id
and etr.include_or_exclude = 'I';
PROCEDURE Insert_Row(X_Rowid IN OUT VARCHAR2,
X_Element_Type_Id NUMBER,
X_Element_Set_Id NUMBER,
X_Include_Or_Exclude VARCHAR2,
X_Last_Update_Date DATE,
X_Last_Updated_By NUMBER,
X_Last_Update_Login NUMBER,
X_Created_By NUMBER,
X_Creation_Date DATE) IS
--
CURSOR C IS SELECT rowid FROM pay_element_type_rules
WHERE element_set_id = X_Element_Set_Id
AND element_type_id = X_Element_Type_Id;
INSERT INTO pay_element_type_rules
(element_type_id,
element_set_id,
include_or_exclude,
last_update_date,
last_updated_by,
last_update_login,
created_by,
creation_date)
VALUES
(X_Element_Type_Id,
X_Element_Set_Id,
X_Include_Or_Exclude,
X_Last_Update_Date,
X_Last_Updated_By,
X_Last_Update_Login,
X_Created_By,
X_Creation_Date);
'pay_element_type_rules_pkg.insert_row');
END Insert_Row;
CURSOR C IS SELECT * FROM pay_element_type_rules
WHERE rowid = X_Rowid FOR UPDATE of Element_Set_Id NOWAIT;
PROCEDURE Update_Row(X_Rowid VARCHAR2,
X_Element_Type_Id NUMBER,
X_Element_Set_Id NUMBER,
X_Include_Or_Exclude VARCHAR2,
X_Last_Update_Date DATE,
X_Last_Updated_By NUMBER,
X_Last_Update_Login NUMBER) IS
BEGIN
--
UPDATE pay_element_type_rules
SET element_type_id = X_Element_Type_Id,
element_set_id = X_Element_Set_Id,
include_or_exclude = X_Include_Or_Exclude,
last_update_date = X_Last_Update_Date,
last_updated_by = X_Last_Updated_By,
last_update_login = X_Last_Update_Login
WHERE rowid = X_rowid;
'pay_element_type_rules_pkg.update_row');
END Update_Row;
PROCEDURE Delete_Row(X_Rowid VARCHAR2) IS
BEGIN
--
DELETE FROM pay_element_type_rules
WHERE rowid = X_Rowid;
'pay_element_type_rules_pkg.delete_row');
END Delete_Row;