The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT
ID,
INS_ID,
TRANSACTION_DATE,
TRANSACTION_TYPE,
SYSTEM_ID,
INSTANCE_ID_NEW,
INSTANCE_QTY_OLD,
INSTANCE_QTY_NEW,
INSTANCE_AMT_OLD,
INSTANCE_AMT_NEW,
OLD_CONTRACT_ID,
OLD_CONTACT_START_DATE,
OLD_CONTRACT_END_DATE,
NEW_CONTRACT_ID,
NEW_CONTACT_START_DATE,
NEW_CONTRACT_END_DATE,
OLD_SERVICE_LINE_ID,
OLD_SERVICE_START_DATE,
OLD_SERVICE_END_DATE,
NEW_SERVICE_LINE_ID,
NEW_SERVICE_START_DATE,
NEW_SERVICE_END_DATE,
OLD_SUBLINE_ID,
OLD_SUBLINE_START_DATE,
OLD_SUBLINE_END_DATE,
NEW_SUBLINE_ID,
NEW_SUBLINE_START_DATE,
NEW_SUBLINE_END_DATE,
OLD_CUSTOMER,
NEW_CUSTOMER,
OLD_K_STATUS,
NEW_K_STATUS,
SUBLINE_DATE_TERMINATED,
TRANSFER_OPTION,
CREATED_BY,
CREATION_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATE_LOGIN,
OBJECT_VERSION_NUMBER,
SECURITY_GROUP_ID,
DATE_CANCELLED
FROM Oks_Inst_Hist_Details_V
WHERE oks_inst_hist_details_v.id = p_id;
l_ihdv_rec.last_updated_by,
l_ihdv_rec.last_update_date,
l_ihdv_rec.last_update_login,
l_ihdv_rec.object_version_number,
l_ihdv_rec.security_group_id,
l_ihdv_rec.date_cancelled;
SELECT
ID,
INS_ID,
TRANSACTION_DATE,
TRANSACTION_TYPE,
SYSTEM_ID,
INSTANCE_ID_NEW,
INSTANCE_QTY_OLD,
INSTANCE_QTY_NEW,
INSTANCE_AMT_OLD,
INSTANCE_AMT_NEW,
OLD_CONTRACT_ID,
OLD_CONTACT_START_DATE,
OLD_CONTRACT_END_DATE,
NEW_CONTRACT_ID,
NEW_CONTACT_START_DATE,
NEW_CONTRACT_END_DATE,
OLD_SERVICE_LINE_ID,
OLD_SERVICE_START_DATE,
OLD_SERVICE_END_DATE,
NEW_SERVICE_LINE_ID,
NEW_SERVICE_START_DATE,
NEW_SERVICE_END_DATE,
OLD_SUBLINE_ID,
OLD_SUBLINE_START_DATE,
OLD_SUBLINE_END_DATE,
NEW_SUBLINE_ID,
NEW_SUBLINE_START_DATE,
NEW_SUBLINE_END_DATE,
OLD_CUSTOMER,
NEW_CUSTOMER,
OLD_K_STATUS,
NEW_K_STATUS,
SUBLINE_DATE_TERMINATED,
TRANSFER_OPTION,
CREATED_BY,
CREATION_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATE_LOGIN,
OBJECT_VERSION_NUMBER,
DATE_CANCELLED
FROM Oks_Inst_Hist_Details
WHERE oks_inst_hist_details.id = p_id;
l_ihd_rec.last_updated_by,
l_ihd_rec.last_update_date,
l_ihd_rec.last_update_login,
l_ihd_rec.object_version_number,
l_ihd_rec.date_cancelled;
IF (l_ihdv_rec.last_updated_by = OKC_API.G_MISS_NUM ) THEN
l_ihdv_rec.last_updated_by := NULL;
IF (l_ihdv_rec.last_update_date = OKC_API.G_MISS_DATE ) THEN
l_ihdv_rec.last_update_date := NULL;
IF (l_ihdv_rec.last_update_login = OKC_API.G_MISS_NUM ) THEN
l_ihdv_rec.last_update_login := NULL;
p_to.last_updated_by := p_from.last_updated_by;
p_to.last_update_date := p_from.last_update_date;
p_to.last_update_login := p_from.last_update_login;
p_to.last_updated_by := p_from.last_updated_by;
p_to.last_update_date := p_from.last_update_date;
p_to.last_update_login := p_from.last_update_login;
PROCEDURE insert_row(
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihd_rec IN ihd_rec_type,
x_ihd_rec OUT NOCOPY ihd_rec_type) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'B_insert_row';
INSERT INTO OKS_INST_HIST_DETAILS(
id,
ins_id,
transaction_date,
transaction_type,
system_id,
instance_id_new,
instance_qty_old,
instance_qty_new,
instance_amt_old,
instance_amt_new,
old_contract_id,
old_contact_start_date,
old_contract_end_date,
new_contract_id,
new_contact_start_date,
new_contract_end_date,
old_service_line_id,
old_service_start_date,
old_service_end_date,
new_service_line_id,
new_service_start_date,
new_service_end_date,
old_subline_id,
old_subline_start_date,
old_subline_end_date,
new_subline_id,
new_subline_start_date,
new_subline_end_date,
old_customer,
new_customer,
old_k_status,
new_k_status,
subline_date_terminated,
transfer_option,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login,
object_version_number,
date_cancelled)
VALUES (
l_ihd_rec.id,
l_ihd_rec.ins_id,
l_ihd_rec.transaction_date,
l_ihd_rec.transaction_type,
l_ihd_rec.system_id,
l_ihd_rec.instance_id_new,
l_ihd_rec.instance_qty_old,
l_ihd_rec.instance_qty_new,
l_ihd_rec.instance_amt_old,
l_ihd_rec.instance_amt_new,
l_ihd_rec.old_contract_id,
l_ihd_rec.old_contact_start_date,
l_ihd_rec.old_contract_end_date,
l_ihd_rec.new_contract_id,
l_ihd_rec.new_contact_start_date,
l_ihd_rec.new_contract_end_date,
l_ihd_rec.old_service_line_id,
l_ihd_rec.old_service_start_date,
l_ihd_rec.old_service_end_date,
l_ihd_rec.new_service_line_id,
l_ihd_rec.new_service_start_date,
l_ihd_rec.new_service_end_date,
l_ihd_rec.old_subline_id,
l_ihd_rec.old_subline_start_date,
l_ihd_rec.old_subline_end_date,
l_ihd_rec.new_subline_id,
l_ihd_rec.new_subline_start_date,
l_ihd_rec.new_subline_end_date,
l_ihd_rec.old_customer,
l_ihd_rec.new_customer,
l_ihd_rec.old_k_status,
l_ihd_rec.new_k_status,
l_ihd_rec.subline_date_terminated,
l_ihd_rec.transfer_option,
l_ihd_rec.created_by,
l_ihd_rec.creation_date,
l_ihd_rec.last_updated_by,
l_ihd_rec.last_update_date,
l_ihd_rec.last_update_login,
l_ihd_rec.object_version_number,
l_ihd_rec.date_cancelled);
END insert_row;
PROCEDURE insert_row(
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihdv_rec IN ihdv_rec_type,
x_ihdv_rec OUT NOCOPY ihdv_rec_type) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'V_insert_row';
l_ihdv_rec.LAST_UPDATE_DATE := l_ihdv_rec.CREATION_DATE;
l_ihdv_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
l_ihdv_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
insert_row(
p_init_msg_list,
l_return_status,
x_msg_count,
x_msg_data,
l_ihd_rec,
lx_ihd_rec
);
END insert_row;
PROCEDURE insert_row(
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihdv_tbl IN ihdv_tbl_type,
x_ihdv_tbl OUT NOCOPY ihdv_tbl_type,
px_error_tbl IN OUT NOCOPY OKC_API.ERROR_TBL_TYPE) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'V_error_tbl_insert_row';
insert_row (
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => l_error_rec.error_type,
x_msg_count => l_error_rec.msg_count,
x_msg_data => l_error_rec.msg_data,
p_ihdv_rec => p_ihdv_tbl(i),
x_ihdv_rec => x_ihdv_tbl(i));
END insert_row;
PROCEDURE insert_row(
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihdv_tbl IN ihdv_tbl_type,
x_ihdv_tbl OUT NOCOPY ihdv_tbl_type) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'V_tbl_insert_row';
insert_row (
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_ihdv_tbl => p_ihdv_tbl,
x_ihdv_tbl => x_ihdv_tbl,
px_error_tbl => l_error_tbl);
END insert_row;
SELECT OBJECT_VERSION_NUMBER
FROM OKS_INST_HIST_DETAILS
WHERE ID = p_ihd_rec.id
AND OBJECT_VERSION_NUMBER = p_ihd_rec.object_version_number
FOR UPDATE OF OBJECT_VERSION_NUMBER NOWAIT;
SELECT OBJECT_VERSION_NUMBER
FROM OKS_INST_HIST_DETAILS
WHERE ID = p_ihd_rec.id;
OKC_API.set_message(G_FND_APP,G_FORM_RECORD_DELETED);
OKC_API.set_message(G_APP_NAME,G_RECORD_LOGICALLY_DELETED);
PROCEDURE update_row(
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihd_rec IN ihd_rec_type,
x_ihd_rec OUT NOCOPY ihd_rec_type) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'B_update_row';
IF (x_ihd_rec.last_updated_by = OKC_API.G_MISS_NUM)
THEN
x_ihd_rec.last_updated_by := l_ihd_rec.last_updated_by;
IF (x_ihd_rec.last_update_date = OKC_API.G_MISS_DATE)
THEN
x_ihd_rec.last_update_date := l_ihd_rec.last_update_date;
IF (x_ihd_rec.last_update_login = OKC_API.G_MISS_NUM)
THEN
x_ihd_rec.last_update_login := l_ihd_rec.last_update_login;
UPDATE OKS_INST_HIST_DETAILS
SET INS_ID = l_def_ihd_rec.ins_id,
TRANSACTION_DATE = l_def_ihd_rec.transaction_date,
TRANSACTION_TYPE = l_def_ihd_rec.transaction_type,
SYSTEM_ID = l_def_ihd_rec.system_id,
INSTANCE_ID_NEW = l_def_ihd_rec.instance_id_new,
INSTANCE_QTY_OLD = l_def_ihd_rec.instance_qty_old,
INSTANCE_QTY_NEW = l_def_ihd_rec.instance_qty_new,
INSTANCE_AMT_OLD = l_def_ihd_rec.instance_amt_old,
INSTANCE_AMT_NEW = l_def_ihd_rec.instance_amt_new,
OLD_CONTRACT_ID = l_def_ihd_rec.old_contract_id,
OLD_CONTACT_START_DATE = l_def_ihd_rec.old_contact_start_date,
OLD_CONTRACT_END_DATE = l_def_ihd_rec.old_contract_end_date,
NEW_CONTRACT_ID = l_def_ihd_rec.new_contract_id,
NEW_CONTACT_START_DATE = l_def_ihd_rec.new_contact_start_date,
NEW_CONTRACT_END_DATE = l_def_ihd_rec.new_contract_end_date,
OLD_SERVICE_LINE_ID = l_def_ihd_rec.old_service_line_id,
OLD_SERVICE_START_DATE = l_def_ihd_rec.old_service_start_date,
OLD_SERVICE_END_DATE = l_def_ihd_rec.old_service_end_date,
NEW_SERVICE_LINE_ID = l_def_ihd_rec.new_service_line_id,
NEW_SERVICE_START_DATE = l_def_ihd_rec.new_service_start_date,
NEW_SERVICE_END_DATE = l_def_ihd_rec.new_service_end_date,
OLD_SUBLINE_ID = l_def_ihd_rec.old_subline_id,
OLD_SUBLINE_START_DATE = l_def_ihd_rec.old_subline_start_date,
OLD_SUBLINE_END_DATE = l_def_ihd_rec.old_subline_end_date,
NEW_SUBLINE_ID = l_def_ihd_rec.new_subline_id,
NEW_SUBLINE_START_DATE = l_def_ihd_rec.new_subline_start_date,
NEW_SUBLINE_END_DATE = l_def_ihd_rec.new_subline_end_date,
OLD_CUSTOMER = l_def_ihd_rec.old_customer,
NEW_CUSTOMER = l_def_ihd_rec.new_customer,
OLD_K_STATUS = l_def_ihd_rec.old_k_status,
NEW_K_STATUS = l_def_ihd_rec.new_k_status,
SUBLINE_DATE_TERMINATED = l_def_ihd_rec.subline_date_terminated,
TRANSFER_OPTION = l_def_ihd_rec.transfer_option,
CREATED_BY = l_def_ihd_rec.created_by,
CREATION_DATE = l_def_ihd_rec.creation_date,
LAST_UPDATED_BY = l_def_ihd_rec.last_updated_by,
LAST_UPDATE_DATE = l_def_ihd_rec.last_update_date,
LAST_UPDATE_LOGIN = l_def_ihd_rec.last_update_login,
OBJECT_VERSION_NUMBER = l_def_ihd_rec.object_version_number,
DATE_CANCELLED = l_def_ihd_rec.date_cancelled
WHERE ID = l_def_ihd_rec.id;
END update_row;
PROCEDURE update_row(
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihdv_rec IN ihdv_rec_type,
x_ihdv_rec OUT NOCOPY ihdv_rec_type) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'V_update_row';
l_ihdv_rec.LAST_UPDATE_DATE := SYSDATE;
l_ihdv_rec.LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
l_ihdv_rec.LAST_UPDATE_LOGIN := FND_GLOBAL.LOGIN_ID;
IF (x_ihdv_rec.last_updated_by = OKC_API.G_MISS_NUM)
THEN
x_ihdv_rec.last_updated_by := l_db_ihdv_rec.last_updated_by;
IF (x_ihdv_rec.last_update_date = OKC_API.G_MISS_DATE)
THEN
x_ihdv_rec.last_update_date := l_db_ihdv_rec.last_update_date;
IF (x_ihdv_rec.last_update_login = OKC_API.G_MISS_NUM)
THEN
x_ihdv_rec.last_update_login := l_db_ihdv_rec.last_update_login;
update_row(
p_init_msg_list,
l_return_status,
x_msg_count,
x_msg_data,
l_ihd_rec,
lx_ihd_rec
);
END update_row;
PROCEDURE update_row(
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihdv_tbl IN ihdv_tbl_type,
x_ihdv_tbl OUT NOCOPY ihdv_tbl_type,
px_error_tbl IN OUT NOCOPY OKC_API.ERROR_TBL_TYPE) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'V_error_tbl_update_row';
update_row (
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => l_error_rec.error_type,
x_msg_count => l_error_rec.msg_count,
x_msg_data => l_error_rec.msg_data,
p_ihdv_rec => p_ihdv_tbl(i),
x_ihdv_rec => x_ihdv_tbl(i));
END update_row;
PROCEDURE update_row(
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihdv_tbl IN ihdv_tbl_type,
x_ihdv_tbl OUT NOCOPY ihdv_tbl_type) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'V_tbl_update_row';
update_row (
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_ihdv_tbl => p_ihdv_tbl,
x_ihdv_tbl => x_ihdv_tbl,
px_error_tbl => l_error_tbl);
END update_row;
PROCEDURE delete_row(
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihd_rec IN ihd_rec_type) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'B_delete_row';
DELETE FROM OKS_INST_HIST_DETAILS
WHERE ID = p_ihd_rec.id;
END delete_row;
PROCEDURE delete_row(
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihdv_rec IN ihdv_rec_type) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'V_delete_row';
delete_row(
p_init_msg_list,
l_return_status,
x_msg_count,
x_msg_data,
l_ihd_rec
);
END delete_row;
PROCEDURE delete_row(
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihdv_tbl IN ihdv_tbl_type,
px_error_tbl IN OUT NOCOPY OKC_API.ERROR_TBL_TYPE) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'V_error_tbl_delete_row';
delete_row (
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => l_error_rec.error_type,
x_msg_count => l_error_rec.msg_count,
x_msg_data => l_error_rec.msg_data,
p_ihdv_rec => p_ihdv_tbl(i));
END delete_row;
PROCEDURE delete_row(
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_ihdv_tbl IN ihdv_tbl_type) IS
l_api_version CONSTANT NUMBER := 1;
l_api_name CONSTANT VARCHAR2(30) := 'V_tbl_delete_row';
delete_row (
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_ihdv_tbl => p_ihdv_tbl,
px_error_tbl => l_error_tbl);
END delete_row;