The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
booking_deal_id,
customer_id,
approved_by_person_id,
business_group_id,
name,
object_version_number,
start_date,
category,
comments,
description,
discount_percentage,
end_date,
number_of_places,
LIMIT_EACH_EVENT_FLAG,
overdraft_limit,
type,
price_list_id,
activity_version_id,
event_id,
tbd_information_category,
tbd_information1,
tbd_information2,
tbd_information3,
tbd_information4,
tbd_information5,
tbd_information6,
tbd_information7,
tbd_information8,
tbd_information9,
tbd_information10,
tbd_information11,
tbd_information12,
tbd_information13,
tbd_information14,
tbd_information15,
tbd_information16,
tbd_information17,
tbd_information18,
tbd_information19,
tbd_information20
from ota_booking_deals
where booking_deal_id = p_booking_deal_id;
select nvl(count(a.booking_deal_id),0)
from ota_finance_lines a
where p_booking_deal_id = booking_deal_id
and cancelled_flag = 'N';
select nvl(count(a.booking_deal_id),0)
from ota_finance_lines a,
ota_delegate_bookings b,
ota_events c
where a.booking_deal_id = p_booking_deal_id
and a.booking_id = b.booking_id
and b.event_id = c.event_id
and p_start_date <= nvl(c.course_start_date,p_start_date)
and nvl(p_end_date,hr_api.g_eot)
>= nvl(c.course_start_date,nvl(p_end_date,hr_api.g_eot))
and a.cancelled_flag = 'N';
select sum (TFL.UNITARY_AMOUNT),
sum (TFL.MONEY_AMOUNT)
from OTA_FINANCE_LINES TFL
where TFL.BOOKING_DEAL_ID (+) = P_BOOKING_DEAL_ID
and ( (TFL.CANCELLED_FLAG is null)
or (TFL.CANCELLED_FLAG = 'N' ))
and TFL.LINE_TYPE = P_LINE_TYPE;
select 'TRUE'
from OTA_FINANCE_LINES TFL
where TFL.BOOKING_DEAL_ID (+) = P_BOOKING_DEAL_ID
and ( (TFL.CANCELLED_FLAG is null)
or (TFL.CANCELLED_FLAG = 'N' ));
select 1
from OTA_BOOKING_DEALS TBD
where TBD.BUSINESS_GROUP_ID+0 = P_BUSINESS_GROUP_ID
and upper (TBD.NAME) = upper (P_NAME)
and (p_customer_id is not null and
(customer_id is null or
(customer_id is not null and
customer_id = p_customer_id))
or (p_customer_id is null))
and ( (P_BOOKING_DEAL_ID is null )
or (TBD.BOOKING_DEAL_ID <> P_BOOKING_DEAL_ID));
select TPL.BUSINESS_GROUP_ID,
nvl (TPL.START_DATE, hr_api.g_sot),
nvl (TPL.END_DATE, hr_api.g_eot)
from OTA_PRICE_LISTS TPL
where TPL.PRICE_LIST_ID = P_PRICE_LIST_ID;
select EVT.BUSINESS_GROUP_ID,
EVT.EVENT_TYPE,
nvl (EVT.COURSE_START_DATE,hr_api.g_sot),
nvl (EVT.COURSE_END_DATE ,hr_api.g_eot),
maximum_attendees,
price_basis
from OTA_EVENTS EVT
where EVT.EVENT_ID = P_EVENT_ID;
select nvl (TAV.START_DATE, hr_api.g_sot),
nvl (TAV.END_DATE, hr_api.g_eot)
from OTA_ACTIVITY_VERSIONS TAV
where TAV.ACTIVITY_VERSION_ID = P_ACTIVITY_VERSION_ID;
select 1
from OTA_CATEGORY_USAGES TCU
where TCU.BUSINESS_GROUP_ID = P_BUSINESS_GROUP_ID
and TCU.CATEGORY_usage_id = P_CATEGORY
and TCU.TYPE = 'D';
select 'YES'
from OTA_FINANCE_LINES TFL
where TFL.BOOKING_DEAL_ID = P_BOOKING_DEAL_ID;
Procedure insert_dml(p_rec in out nocopy g_rec_type) is
--
l_proc varchar2(72) := g_package||'insert_dml';
insert into ota_booking_deals
( booking_deal_id,
customer_id,
approved_by_person_id,
business_group_id,
name,
object_version_number,
start_date,
category,
comments,
description,
discount_percentage,
end_date,
number_of_places,
LIMIT_EACH_EVENT_FLAG,
overdraft_limit,
type,
price_list_id,
activity_version_id,
event_id,
tbd_information_category,
tbd_information1,
tbd_information2,
tbd_information3,
tbd_information4,
tbd_information5,
tbd_information6,
tbd_information7,
tbd_information8,
tbd_information9,
tbd_information10,
tbd_information11,
tbd_information12,
tbd_information13,
tbd_information14,
tbd_information15,
tbd_information16,
tbd_information17,
tbd_information18,
tbd_information19,
tbd_information20
)
Values
( p_rec.booking_deal_id,
p_rec.customer_id,
p_rec.approved_by_person_id,
p_rec.business_group_id,
p_rec.name,
p_rec.object_version_number,
p_rec.start_date,
p_rec.category,
p_rec.comments,
p_rec.description,
p_rec.discount_percentage,
p_rec.end_date,
p_rec.number_of_places,
P_REC.LIMIT_EACH_EVENT_FLAG,
p_rec.overdraft_limit,
p_rec.type,
p_rec.price_list_id,
p_rec.activity_version_id,
p_rec.event_id,
p_rec.tbd_information_category,
p_rec.tbd_information1,
p_rec.tbd_information2,
p_rec.tbd_information3,
p_rec.tbd_information4,
p_rec.tbd_information5,
p_rec.tbd_information6,
p_rec.tbd_information7,
p_rec.tbd_information8,
p_rec.tbd_information9,
p_rec.tbd_information10,
p_rec.tbd_information11,
p_rec.tbd_information12,
p_rec.tbd_information13,
p_rec.tbd_information14,
p_rec.tbd_information15,
p_rec.tbd_information16,
p_rec.tbd_information17,
p_rec.tbd_information18,
p_rec.tbd_information19,
p_rec.tbd_information20
);
End insert_dml;
Procedure update_dml(p_rec in out nocopy g_rec_type) is
--
l_proc varchar2(72) := g_package||'update_dml';
update ota_booking_deals
set
booking_deal_id = p_rec.booking_deal_id,
customer_id = p_rec.customer_id,
approved_by_person_id = p_rec.approved_by_person_id,
business_group_id = p_rec.business_group_id,
name = p_rec.name,
object_version_number = p_rec.object_version_number,
start_date = p_rec.start_date,
category = p_rec.category,
comments = p_rec.comments,
description = p_rec.description,
discount_percentage = p_rec.discount_percentage,
end_date = p_rec.end_date,
number_of_places = p_rec.number_of_places,
LIMIT_EACH_EVENT_FLAG = P_REC.LIMIT_EACH_EVENT_FLAG,
overdraft_limit = p_rec.overdraft_limit,
type = p_rec.type,
price_list_id = p_rec.price_list_id,
activity_version_id = p_rec.activity_version_id,
event_id = p_rec.event_id,
tbd_information_category = p_rec.tbd_information_category,
tbd_information1 = p_rec.tbd_information1,
tbd_information2 = p_rec.tbd_information2,
tbd_information3 = p_rec.tbd_information3,
tbd_information4 = p_rec.tbd_information4,
tbd_information5 = p_rec.tbd_information5,
tbd_information6 = p_rec.tbd_information6,
tbd_information7 = p_rec.tbd_information7,
tbd_information8 = p_rec.tbd_information8,
tbd_information9 = p_rec.tbd_information9,
tbd_information10 = p_rec.tbd_information10,
tbd_information11 = p_rec.tbd_information11,
tbd_information12 = p_rec.tbd_information12,
tbd_information13 = p_rec.tbd_information13,
tbd_information14 = p_rec.tbd_information14,
tbd_information15 = p_rec.tbd_information15,
tbd_information16 = p_rec.tbd_information16,
tbd_information17 = p_rec.tbd_information17,
tbd_information18 = p_rec.tbd_information18,
tbd_information19 = p_rec.tbd_information19,
tbd_information20 = p_rec.tbd_information20
where booking_deal_id = p_rec.booking_deal_id;
End update_dml;
Procedure delete_dml(p_rec in g_rec_type) is
--
l_proc varchar2(72) := g_package||'delete_dml';
delete from ota_booking_deals
where booking_deal_id = p_rec.booking_deal_id;
End delete_dml;
Procedure pre_insert(p_rec in out nocopy g_rec_type) is
--
l_proc varchar2(72) := g_package||'pre_insert';
Cursor C_Sel1 is select ota_booking_deals_s.nextval from sys.dual;
End pre_insert;
Procedure pre_update(p_rec in g_rec_type) is
--
l_proc varchar2(72) := g_package||'pre_update';
End pre_update;
Procedure pre_delete(p_rec in g_rec_type) is
--
l_proc varchar2(72) := g_package||'pre_delete';
End pre_delete;
Procedure post_insert(p_rec in g_rec_type) is
--
l_proc varchar2(72) := g_package||'post_insert';
End post_insert;
Procedure post_update(p_rec in g_rec_type) is
--
l_proc varchar2(72) := g_package||'post_update';
End post_update;
Procedure post_delete(p_rec in g_rec_type) is
--
l_proc varchar2(72) := g_package||'post_delete';
End post_delete;
select booking_deal_id,
customer_id,
approved_by_person_id,
business_group_id,
name,
object_version_number,
start_date,
category,
comments,
description,
discount_percentage,
end_date,
number_of_places,
LIMIT_EACH_EVENT_FLAG,
overdraft_limit,
type,
price_list_id,
activity_version_id,
event_id,
tbd_information_category,
tbd_information1,
tbd_information2,
tbd_information3,
tbd_information4,
tbd_information5,
tbd_information6,
tbd_information7,
tbd_information8,
tbd_information9,
tbd_information10,
tbd_information11,
tbd_information12,
tbd_information13,
tbd_information14,
tbd_information15,
tbd_information16,
tbd_information17,
tbd_information18,
tbd_information19,
tbd_information20
from ota_booking_deals
where booking_deal_id = p_booking_deal_id
for update nowait;
Procedure insert_validate(p_rec in g_rec_type) is
--
l_proc varchar2(72) := g_package||'insert_validate';
End insert_validate;
Procedure update_validate(p_rec in g_rec_type) is
--
l_proc varchar2(72) := g_package||'update_validate';
End update_validate;
Procedure delete_validate(p_rec in g_rec_type) is
--
l_proc varchar2(72) := g_package||'delete_validate';
End delete_validate;
insert_validate(p_rec);
pre_insert(p_rec);
insert_dml(p_rec);
post_insert(p_rec);
update_validate(convert_defs(p_rec));
pre_update(p_rec);
update_dml(p_rec);
post_update(p_rec);
delete_validate(p_rec);
pre_delete(p_rec);
delete_dml(p_rec);
post_delete(p_rec);