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_item_code IN VARCHAR2,
p_ingredient_item_code IN VARCHAR2,
p_source_item_code IN VARCHAR2,
p_level_hierarchy_code IN NUMBER,
p_work_concentration IN NUMBER,
p_uom IN VARCHAR2,
p_quantity 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_item_conc_details
(item_code,
ingredient_item_code,
source_item_code,
level_hierarchy_code,
work_concentration,
uom,
quantity)
VALUES
(p_item_code,
p_ingredient_item_code,
p_source_item_code,
p_level_hierarchy_code,
p_work_concentration,
p_uom,
p_quantity);
/* Now get the row id of the inserted record */
Check_Primary_Key
(p_item_code,
p_ingredient_item_code,
p_source_item_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_item_code IN VARCHAR2,
p_ingredient_item_code IN VARCHAR2,
p_source_item_code IN VARCHAR2,
p_level_hierarchy_code IN NUMBER,
p_work_concentration IN NUMBER,
p_uom IN VARCHAR2,
p_quantity 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_item_conc_details
SET item_code = p_item_code,
ingredient_item_code = p_ingredient_item_code,
source_item_code = p_source_item_code,
level_hierarchy_code = p_level_hierarchy_code,
work_concentration = p_work_concentration,
uom = p_uom,
quantity = p_quantity
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;
SELECT *
FROM gr_item_conc_details
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_item_code IN VARCHAR2,
p_ingredient_item_code IN VARCHAR2,
p_source_item_code IN VARCHAR2,
p_level_hierarchy_code IN NUMBER,
p_work_concentration IN NUMBER,
p_uom IN VARCHAR2,
p_quantity 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_item_conc_details
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_item_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_item_conc_details
WHERE item_code = p_item_code;
ROLLBACK TO SAVEPOINT Delete_Rows;
END Delete_Rows;
SELECT icd.rowid
FROM gr_item_conc_details icd
WHERE icd.item_code = p_item_code
AND icd.ingredient_item_code = p_ingredient_item_code
AND icd.source_item_code = p_source_item_code;