The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE Insert_Row
(p_commit IN VARCHAR2,
p_called_by_form IN VARCHAR2,
p_document_code IN VARCHAR2,
p_location_segment_qualifier IN VARCHAR2,
p_location_segment_value IN VARCHAR2,
p_parent_segment_id IN NUMBER,
p_created_by IN NUMBER,
p_creation_date IN DATE,
p_last_updated_by IN NUMBER,
p_last_update_date IN DATE,
p_last_update_login IN NUMBER,
x_rowid OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_oracle_error OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2)
IS
/* Alpha Variables */
L_RETURN_STATUS VARCHAR2(1) := 'S';
SAVEPOINT Insert_Row;
INSERT INTO gr_document_rtk
(document_code,
location_segment_qualifier,
location_segment_value,
parent_segment_id,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login)
VALUES
(p_document_code,
p_location_segment_qualifier,
p_location_segment_value,
p_parent_segment_id,
p_created_by,
p_creation_date,
p_last_updated_by,
p_last_update_date,
p_last_update_login);
/* Now get the row id of the inserted record */
Check_Primary_Key
(p_document_code,
'F',
l_rowid,
l_key_exists);
ROLLBACK TO SAVEPOINT Insert_Row;
ROLLBACK TO SAVEPOINT Insert_Row;
ROLLBACK TO SAVEPOINT Insert_Row;
'GR_NO_RECORD_INSERTED');
ROLLBACK TO SAVEPOINT Insert_Row;
END Insert_Row;
PROCEDURE Update_Row
(p_commit IN VARCHAR2,
p_called_by_form IN VARCHAR2,
p_rowid IN VARCHAR2,
p_document_code IN VARCHAR2,
p_location_segment_qualifier IN VARCHAR2,
p_location_segment_value IN VARCHAR2,
p_parent_segment_id IN NUMBER,
p_created_by IN NUMBER,
p_creation_date IN DATE,
p_last_updated_by IN NUMBER,
p_last_update_date IN DATE,
p_last_update_login IN NUMBER,
x_return_status OUT NOCOPY VARCHAR2,
x_oracle_error OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2)
IS
/* Alpha Variables */
L_RETURN_STATUS VARCHAR2(1) := 'S';
SAVEPOINT Update_Row;
UPDATE gr_document_rtk
SET document_code = p_document_code,
location_segment_qualifier = p_location_segment_qualifier,
location_segment_value = p_location_segment_value,
parent_segment_id = p_parent_segment_id,
created_by = p_created_by,
creation_date = p_creation_date,
last_updated_by = p_last_updated_by,
last_update_date = p_last_update_date,
last_update_login = p_last_update_login
WHERE rowid = p_rowid;
ROLLBACK TO SAVEPOINT Update_Row;
ROLLBACK TO SAVEPOINT Update_Row;
'GR_NO_RECORD_INSERTED');
ROLLBACK TO SAVEPOINT Update_Row;
END Update_Row;
p_last_updated_by IN NUMBER,
p_last_update_date IN DATE,
p_last_update_login IN NUMBER,
x_return_status OUT NOCOPY VARCHAR2,
x_oracle_error OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2)
IS
/* Alpha Variables */
L_RETURN_STATUS VARCHAR2(1) := 'S';
SELECT *
FROM gr_document_rtk
WHERE rowid = p_rowid
FOR UPDATE NOWAIT;
PROCEDURE Delete_Row
(p_commit IN VARCHAR2,
p_called_by_form IN VARCHAR2,
p_rowid IN VARCHAR2,
p_document_code IN VARCHAR2,
p_location_segment_qualifier IN VARCHAR2,
p_location_segment_value IN VARCHAR2,
p_parent_segment_id IN NUMBER,
p_created_by IN NUMBER,
p_creation_date IN DATE,
p_last_updated_by IN NUMBER,
p_last_update_date IN DATE,
p_last_update_login IN NUMBER,
x_return_status OUT NOCOPY VARCHAR2,
x_oracle_error OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2)
IS
/* Alpha Variables */
L_RETURN_STATUS VARCHAR2(1) := 'S';
SAVEPOINT Delete_Row;
DELETE FROM gr_document_rtk
WHERE rowid = p_rowid;
ROLLBACK TO SAVEPOINT Delete_Row;
ROLLBACK TO SAVEPOINT Delete_Row;
ROLLBACK TO SAVEPOINT Delete_Row;
END Delete_Row;
PROCEDURE Delete_Rows
(p_commit IN VARCHAR2,
p_called_by_form IN VARCHAR2,
p_document_code IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_oracle_error OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2)
IS
/* Alpha Variables */
L_RETURN_STATUS VARCHAR2(1) := 'S';
SAVEPOINT Delete_Rows;
DELETE FROM gr_document_rtk
WHERE document_code = p_document_code;
ROLLBACK TO SAVEPOINT Delete_Rows;
END Delete_Rows;
SELECT av.location_segment_id
FROM ar_location_values av
WHERE location_segment_qualifier = p_location_segment_qualifier
AND location_segment_value = p_location_segment_value
AND parent_segment_id = p_parent_segment_id;
SELECT dr.rowid
FROM gr_document_rtk dr
WHERE dr.document_code = p_document_code;