The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE Insert_Row(
px_enrl_change_rule_id IN OUT NOCOPY NUMBER,
px_object_version_number IN OUT NOCOPY NUMBER,
p_change_from_program_id NUMBER,
p_change_to_program_id NUMBER,
p_change_direction_code VARCHAR2,
p_effective_from_date DATE,
p_effective_to_date DATE,
p_active_flag VARCHAR2,
p_created_by NUMBER,
p_creation_date DATE,
p_last_updated_by NUMBER,
p_last_update_date DATE,
p_last_update_login NUMBER)
IS
x_rowid VARCHAR2(30);
INSERT INTO pv_pg_enrl_change_rules(
enrl_change_rule_id,
object_version_number,
change_from_program_id,
change_to_program_id,
change_direction_code,
effective_from_date,
effective_to_date,
active_flag,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login
) VALUES (
DECODE( px_enrl_change_rule_id, FND_API.G_MISS_NUM, NULL, px_enrl_change_rule_id),
DECODE( px_object_version_number, FND_API.G_MISS_NUM, 1, px_object_version_number),
DECODE( p_change_from_program_id, FND_API.G_MISS_NUM, NULL, p_change_from_program_id),
DECODE( p_change_to_program_id, FND_API.G_MISS_NUM, NULL, p_change_to_program_id),
DECODE( p_change_direction_code, FND_API.g_miss_char, NULL, p_change_direction_code),
DECODE( p_effective_from_date, FND_API.G_MISS_DATE, NULL, p_effective_from_date),
DECODE( p_effective_to_date, FND_API.G_MISS_DATE, NULL, p_effective_to_date),
DECODE( p_active_flag, FND_API.g_miss_char, NULL, p_active_flag),
DECODE( p_created_by, FND_API.G_MISS_NUM, FND_GLOBAL.USER_ID, p_created_by),
DECODE( p_creation_date, FND_API.G_MISS_DATE, SYSDATE, p_creation_date),
DECODE( p_last_updated_by, FND_API.G_MISS_NUM, FND_GLOBAL.USER_ID, p_last_updated_by),
DECODE( p_last_update_date, FND_API.G_MISS_DATE, SYSDATE, p_last_update_date),
DECODE( p_last_update_login, FND_API.G_MISS_NUM, FND_GLOBAL.CONC_LOGIN_ID, p_last_update_login));
END Insert_Row;
PROCEDURE Update_Row(
p_enrl_change_rule_id NUMBER,
px_object_version_number IN OUT NOCOPY NUMBER,
p_change_from_program_id NUMBER,
p_change_to_program_id NUMBER,
p_change_direction_code VARCHAR2,
p_effective_from_date DATE,
p_effective_to_date DATE,
p_active_flag VARCHAR2,
p_last_updated_by NUMBER,
p_last_update_date DATE,
p_last_update_login NUMBER)
IS
BEGIN
Update pv_pg_enrl_change_rules
SET
enrl_change_rule_id = DECODE( p_enrl_change_rule_id, null, enrl_change_rule_id, FND_API.G_MISS_NUM, null, p_enrl_change_rule_id),
object_version_number = object_version_number + 1 ,
change_from_program_id = DECODE( p_change_from_program_id, null, change_from_program_id, FND_API.G_MISS_NUM, null, p_change_from_program_id),
change_to_program_id = DECODE( p_change_to_program_id, null, change_to_program_id, FND_API.G_MISS_NUM, null, p_change_to_program_id),
change_direction_code = DECODE( p_change_direction_code, null, change_direction_code, FND_API.g_miss_char, null, p_change_direction_code),
effective_from_date = DECODE( p_effective_from_date, null, effective_from_date, FND_API.G_MISS_DATE, null, p_effective_from_date),
effective_to_date = DECODE( p_effective_to_date, null, effective_to_date, FND_API.G_MISS_DATE, null, p_effective_to_date),
active_flag = DECODE( p_active_flag, null, active_flag, FND_API.g_miss_char, null, p_active_flag),
last_updated_by = DECODE( p_last_updated_by, null, last_updated_by, FND_API.G_MISS_NUM, null, p_last_updated_by),
last_update_date = DECODE( p_last_update_date, null, last_update_date, FND_API.G_MISS_DATE, null, p_last_update_date),
last_update_login = DECODE( p_last_update_login, null, last_update_login, FND_API.G_MISS_NUM, null, p_last_update_login)
WHERE enrl_change_rule_id = p_enrl_change_rule_id;
END Update_Row;
PROCEDURE Delete_Row(
p_enrl_change_rule_id NUMBER,
p_object_version_number NUMBER)
IS
BEGIN
DELETE FROM pv_pg_enrl_change_rules
WHERE enrl_change_rule_id = p_enrl_change_rule_id
AND object_version_number = p_object_version_number;
END Delete_Row ;
SELECT *
FROM pv_pg_enrl_change_rules
WHERE enrl_change_rule_id = p_enrl_change_rule_id
AND object_version_number = p_object_version_number
FOR UPDATE OF enrl_change_rule_id NOWAIT;