The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT '1'
FROM PER_VALID_GRADES VG
WHERE (ROWID <> X_Rowid
OR X_Rowid IS NULL)
AND VG.business_group_id + 0 = X_Business_Group_Id
AND VG.POSITION_ID = X_Position_Id
AND VG.GRADE_ID = X_Grade_Id
AND (nvl(vg.date_to,x_end_of_time) >= X_Date_from
and vg.date_from <= nvl(X_Date_to,x_end_of_time));
select g.date_to
from per_grades g
where g.grade_id = x_grade_id
and nvl(X_Date_To,x_end_of_time) >
nvl(g.date_to, x_end_of_time);
select g.date_from
from per_grades g
where g.grade_id = x_grade_id
and x_Date_from < g.date_from;
PROCEDURE Insert_Row(X_Rowid IN OUT NOCOPY VARCHAR2,
X_Valid_Grade_Id IN OUT NOCOPY NUMBER,
X_Business_Group_Id NUMBER,
X_Grade_Id NUMBER,
X_Date_From DATE,
X_Comments VARCHAR2,
X_Date_To DATE,
X_Job_Id NUMBER,
X_Position_Id NUMBER,
X_Attribute_Category VARCHAR2,
X_Attribute1 VARCHAR2,
X_Attribute2 VARCHAR2,
X_Attribute3 VARCHAR2,
X_Attribute4 VARCHAR2,
X_Attribute5 VARCHAR2,
X_Attribute6 VARCHAR2,
X_Attribute7 VARCHAR2,
X_Attribute8 VARCHAR2,
X_Attribute9 VARCHAR2,
X_Attribute10 VARCHAR2,
X_Attribute11 VARCHAR2,
X_Attribute12 VARCHAR2,
X_Attribute13 VARCHAR2,
X_Attribute14 VARCHAR2,
X_Attribute15 VARCHAR2,
X_Attribute16 VARCHAR2,
X_Attribute17 VARCHAR2,
X_Attribute18 VARCHAR2,
X_Attribute19 VARCHAR2,
X_Attribute20 VARCHAR2,
x_end_of_time DATE,
x_pst1_date_end DATE,
x_pst1_date_effective DATE
) IS
CURSOR C IS SELECT rowid FROM PER_VALID_GRADES
WHERE valid_grade_id = X_Valid_Grade_Id;
CURSOR C2 IS SELECT per_valid_grades_s.nextval FROM sys.dual;
INSERT INTO PER_VALID_GRADES(
valid_grade_id,
business_group_id,
grade_id,
date_from,
comments,
date_to,
job_id,
position_id,
attribute_category,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
attribute16,
attribute17,
attribute18,
attribute19,
attribute20
) VALUES (
X_Valid_Grade_Id,
X_Business_Group_Id,
X_Grade_Id,
X_Date_From,
X_Comments,
X_Date_To,
X_Job_Id,
X_Position_Id,
X_Attribute_Category,
X_Attribute1,
X_Attribute2,
X_Attribute3,
X_Attribute4,
X_Attribute5,
X_Attribute6,
X_Attribute7,
X_Attribute8,
X_Attribute9,
X_Attribute10,
X_Attribute11,
X_Attribute12,
X_Attribute13,
X_Attribute14,
X_Attribute15,
X_Attribute16,
X_Attribute17,
X_Attribute18,
X_Attribute19,
X_Attribute20
);
hr_utility.set_message_token('PROCEDURE','Insert_row');
END Insert_Row;
SELECT *
FROM PER_VALID_GRADES
WHERE rowid = X_Rowid
FOR UPDATE of Valid_Grade_Id NOWAIT;
PROCEDURE Update_Row(X_Rowid VARCHAR2,
X_Valid_Grade_Id NUMBER,
X_Business_Group_Id NUMBER,
X_Grade_Id NUMBER,
X_Date_From DATE,
X_Comments VARCHAR2,
X_Date_To DATE,
X_Job_Id NUMBER,
X_Position_Id NUMBER,
X_Attribute_Category VARCHAR2,
X_Attribute1 VARCHAR2,
X_Attribute2 VARCHAR2,
X_Attribute3 VARCHAR2,
X_Attribute4 VARCHAR2,
X_Attribute5 VARCHAR2,
X_Attribute6 VARCHAR2,
X_Attribute7 VARCHAR2,
X_Attribute8 VARCHAR2,
X_Attribute9 VARCHAR2,
X_Attribute10 VARCHAR2,
X_Attribute11 VARCHAR2,
X_Attribute12 VARCHAR2,
X_Attribute13 VARCHAR2,
X_Attribute14 VARCHAR2,
X_Attribute15 VARCHAR2,
X_Attribute16 VARCHAR2,
X_Attribute17 VARCHAR2,
X_Attribute18 VARCHAR2,
X_Attribute19 VARCHAR2,
X_Attribute20 VARCHAR2,
x_end_of_time DATE,
x_pst1_date_end DATE,
x_pst1_date_effective DATE
) IS
BEGIN
-- date to must be greater than date from.
if x_date_from > nvl(x_date_to,x_end_of_time) then
hr_utility.set_message(801,'HR_6021_ALL_START_END_DATE');
UPDATE PER_VALID_GRADES
SET
valid_grade_id = X_Valid_Grade_Id,
business_group_id = X_Business_Group_Id,
grade_id = X_Grade_Id,
date_from = X_Date_From,
comments = X_Comments,
date_to = X_Date_To,
job_id = X_Job_Id,
position_id = X_Position_Id,
attribute_category = X_Attribute_Category,
attribute1 = X_Attribute1,
attribute2 = X_Attribute2,
attribute3 = X_Attribute3,
attribute4 = X_Attribute4,
attribute5 = X_Attribute5,
attribute6 = X_Attribute6,
attribute7 = X_Attribute7,
attribute8 = X_Attribute8,
attribute9 = X_Attribute9,
attribute10 = X_Attribute10,
attribute11 = X_Attribute11,
attribute12 = X_Attribute12,
attribute13 = X_Attribute13,
attribute14 = X_Attribute14,
attribute15 = X_Attribute15,
attribute16 = X_Attribute16,
attribute17 = X_Attribute17,
attribute18 = X_Attribute18,
attribute19 = X_Attribute19,
attribute20 = X_Attribute20
WHERE rowid = X_rowid;
hr_utility.set_message_token('PROCEDURE','update_row');
END Update_Row;
PROCEDURE Delete_Row(X_Rowid VARCHAR2) IS
BEGIN
DELETE FROM PER_VALID_GRADES
WHERE rowid = X_Rowid;
hr_utility.set_message_token('PROCEDURE','delete_row');
END Delete_Row;