The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT hao.business_group_id,
evt.organization_id,
evt.currency_code,
evt.course_start_date,
evt.course_end_date,
evt.Title,
evt.owner_id,
off.activity_version_id,
evt.offering_id
FROM OTA_EVENTS_VL evt,
OTA_OFFERINGS off,
HR_ALL_ORGANIZATION_UNITS hao
WHERE evt.event_id = pp_event_id
AND off.offering_id = evt.parent_offering_id
AND evt.organization_id = hao.organization_id (+);
Select event_status, maximum_internal_attendees, maximum_attendees
from OTA_EVENTS
WHERE EVENT_ID = TO_NUMBER(p_event_id);
SELECT count(booking_id)
FROM OTA_DELEGATE_BOOKINGS dbt,
OTA_BOOKING_STATUS_TYPES bst
WHERE dbt.event_id = TO_NUMBER(p_event_id)
AND dbt.internal_booking_flag = 'Y'
AND dbt.booking_status_type_id = bst.booking_status_type_id
AND bst.type in ('P','A','E'); --Bug 4301617
SELECT sum(number_of_places)
FROM OTA_DELEGATE_BOOKINGS dbt,
OTA_BOOKING_STATUS_TYPES bst
WHERE dbt.event_id = TO_NUMBER(p_event_id)
AND dbt.booking_status_type_id = bst.booking_status_type_id
AND bst.type in ('P','A','E');
SELECT nvl(price_basis,NULL)
FROM ota_events
where event_id = p_event_id;
SELECT
USER_NAME
FROM
FND_USER
WHERE
Employee_id = p_owner_id ;
SELECT version_name
FROM OTA_ACTIVITY_VERSIONS_TL
WHERE activity_version_id = p_activity_version_id
AND language=userenv('LANG');
SELECT bjs.priority_level
FROM ota_bkng_justifications_b BJS
WHERE bjs.booking_justification_id = p_booking_justification_id;
UPDATE ota_finance_lines SET transfer_status = 'AT'
WHERE finance_line_id = l_finance_line_id;
SELECT FLN.finance_line_id finance_line_id,
FLN.finance_header_id finance_header_id,
FLN.transfer_status transfer_status,
FLN.booking_id booking_id,
FLN.object_version_number object_version_number,
FLN.sequence_number sequence_number,
FLN.Cancelled_flag cancelled_flag
FROM OTA_FINANCE_LINES FLN
WHERE FLN.booking_id = p_booking_id;
SELECT count(*)
FROM OTA_FINANCE_LINES FLN
WHERE FLN.finance_header_id = p_finance_header_id;
SELECT FLH.finance_header_id finance_header_id,
FLH.cancelled_flag cancelled_flag,
FLH.transfer_status transfer_status,
FLH.object_version_number object_version_number
FROM OTA_FINANCE_HEADERS FLH,
OTA_FINANCE_LINES FLN
WHERE FLH.finance_header_id = FLN.finance_header_id
AND FLN.booking_id = p_booking_id;
SELECT e.course_start_date,
e.course_start_time,
e.course_end_date
FROM ota_events_vl e,
ota_offerings o,
ota_activity_versions_tl a
WHERE e.parent_offering_id = o.offering_id
AND o.activity_version_id = a.activity_version_id
AND e.event_id = p_event_id
AND language=userenv('LANG');
SELECT b.event_id,
b.delegate_person_id,
b.delegate_contact_id,
b.date_booking_placed,
b.content_player_status,
b.object_version_number
FROM ota_delegate_bookings b
WHERE b.booking_id = p_booking_id;
SELECT assg.assignment_id,
assg.business_group_id,
assg.organization_id,
pcak.cost_allocation_keyflex_id,
pcak.concatenated_segments,
pcaf.proportion
FROM per_all_people_f per,
per_all_assignments_f assg,
pay_cost_allocations_f pcaf,
pay_cost_allocation_keyflex pcak
WHERE per.person_id = p_person_id
AND per.person_id = assg.person_id
AND assg.assignment_id = pcaf.assignment_id
AND assg.Primary_flag = 'Y'
AND pcaf.cost_allocation_keyflex_id = pcak.cost_allocation_keyflex_id
AND pcak.enabled_flag = 'Y'
AND sysdate between nvl(pcaf.effective_start_date,sysdate)
and nvl(pcaf.effective_end_date,sysdate+1)
AND trunc(sysdate) between nvl(assg.effective_start_date,trunc(sysdate))
and nvl(assg.effective_end_date,trunc(sysdate+1))
AND trunc(sysdate) between nvl(per.effective_start_date,trunc(sysdate))
and nvl(per.effective_end_date,trunc(sysdate+1));
SELECT assg.assignment_id,
assg.business_group_id,
assg.organization_id
FROM per_all_people_f per,
per_all_assignments_f assg
WHERE per.person_id = p_delegate_id
AND per.person_id = assg.person_id
AND trunc(sysdate) between nvl(assg.effective_start_date,trunc(sysdate))
and nvl(assg.effective_end_date,trunc(sysdate+1))
AND assg.primary_flag = 'Y'
AND trunc(sysdate) between nvl(per.effective_start_date,trunc(sysdate))
and nvl(per.effective_end_date,trunc(sysdate+1));
SELECT ov.booking_id
FROM ota_booking_status_types os,
ota_delegate_bookings ov
WHERE ov.event_id = p_event_id
AND (p_person_id IS NOT NULL AND ov.delegate_person_id = p_person_id
OR p_delegate_contact_id IS NOT NULL and ov.delegate_contact_id = p_delegate_contact_id)
AND os.booking_status_type_id = ov.booking_status_type_id
AND os.type = 'C';
SELECT ov.booking_id
FROM ota_booking_status_types os,
ota_delegate_bookings ov
WHERE ov.event_id = p_event_id
AND (p_person_id IS NOT NULL AND ov.delegate_person_id = p_person_id
OR p_delegate_contact_id IS NOT NULL and ov.delegate_contact_id = p_delegate_contact_id)
AND os.booking_status_type_id = ov.booking_status_type_id
AND os.type <> 'C';
SELECT secure_event_flag,organization_id
from ota_events
where event_id = p_event_id;
SELECT organization_id
from per_all_assignments_f
where person_id = p_delegate_id and
trunc(sysdate) between effective_start_date and
effective_end_date;
SELECT ea.organization_id, ea.job_id, ea.position_id
FROM ota_event_associations ea
WHERE ea.event_id = p_event_id;
SELECT course_start_date
-- FROM otv_scheduled_events
FROM ota_events
WHERE event_id = p_event_id and
--Bug#2201434 SELFPACED event_type included.
-- event_type='SCHEDULED' and
event_type in ('SCHEDULED','SELFPACED') and
event_status in('P','N','F')and
TRUNC(SYSDATE) BETWEEN NVL( ENROLMENT_START_DATE, TRUNC(
SYSDATE)) AND
NVL( ENROLMENT_END_DATE, TRUNC( SYSDATE)) AND
TRUNC(SYSDATE) <= NVL( COURSE_END_DATE, TRUNC(SYSDATE));
SELECT a.assignment_id
FROM per_all_assignments_f a
WHERE a.person_id = p_delegate_id
--Modified for bug#5032859
AND( nvl(fnd_profile.value('OTA_ALLOW_FUTURE_ENDDATED_EMP_ENROLLMENTS'),'N') = 'Y'
OR
NVL(p_course_start_date,trunc(sysdate)) BETWEEN
a.effective_start_date AND a.effective_end_date
)
AND NVL(p_organization_id, -1) = DECODE(p_organization_id, null, -1,
NVL(a.organization_id,-1))
AND NVL(p_job_id, -1) = DECODE(p_job_id, null, -1,
NVL(a.job_id, -1))
AND NVL(p_position_id,-1) = DECODE(p_position_id, null, -1,
NVL(a.position_id, -1))
AND a.assignment_type = 'E';
SELECT EVT.public_event_flag,EVT.maximum_internal_attendees
from ota_events EVT
where EVT.event_id = p_event_id;
SELECT EVT.public_event_flag,EVT.maximum_internal_attendees
from ota_events EVT, ota_event_associations EVA
where EVT.event_id = p_event_id and
EVT.event_id = EVA.event_id and
EVA.customer_id = l_customer_id;
SELECT object_version_number
FROM ota_delegate_bookings
WHERE booking_id = p_booking_id;
SELECT a.version_name,
e.title,
e.event_status,
e.course_start_date,
e.course_start_time,
e.course_end_date,
e.owner_id
FROM ota_events_vl e,
ota_offerings o,
ota_activity_versions_tl a
WHERE e.parent_offering_id = o.offering_id
AND o.activity_version_id = a.activity_version_id
AND e.event_id = p_event_id
AND language=userenv('LANG');
SELECT b.date_booking_placed, b.content_player_status, b.object_version_number
FROM ota_delegate_bookings b
WHERE b.booking_id = p_booking_id;
SELECT fln.finance_line_id finance_line_id,
fln.finance_header_id finance_header_id,
fln.transfer_status transfer_status,
fln.booking_id booking_id,
fln.object_version_number object_version_number,
fln.sequence_number sequence_number,
fln.Cancelled_flag cancelled_flag
FROM ota_finance_lines fln
WHERE fln.booking_id = p_booking_id;
SELECT count(finance_line_id)
FROM ota_finance_lines fln
WHERE fln.finance_header_id = p_finance_header_id;
SELECT flh.finance_header_id finance_header_id,
flh.cancelled_flag cancelled_flag,
flh.transfer_status transfer_status,
flh.object_version_number object_version_number
FROM ota_finance_headers flh,
ota_finance_lines fln
WHERE flh.finance_header_id = fln.finance_header_id
AND fln.booking_id = p_booking_id;
SELECT USER_NAME
FROM FND_USER
WHERE Employee_id = p_owner_id
AND trunc(sysdate) between start_date and nvl(end_date,to_date('4712/12/31', 'YYYY/MM/DD')); --Bug 5676892
/* Bug#6063768 Since this notification is sent from ota_delegate_booking_api.update_delegate_booking_api
commenting this notification
ELSE
IF l_username IS NOT NULL THEN
ota_initialization_wf.manual_waitlist
(p_itemtype => 'OTWF',
p_process => 'OTA_MANUAL_WAITLIST',
p_event_title => l_event_title,
p_event_id => p_event_id,
p_item_key => p_booking_id||':'||to_char(l_sysdate,'DD-MON-YYYY:HH24:MI:SS'),
p_user_name => l_username);
ota_tdb_api_upd2.update_enrollment
(p_booking_id => p_booking_id,
p_booking_status_type_id => p_booking_status_type_id,
p_object_version_number => l_object_version_number,
p_event_id => p_event_id,
p_status_change_comments => p_cancel_reason,
p_tfl_object_version_number => lf_object_version_number,
p_finance_line_id => l_finance_line_id,
p_daemon_flag => l_daemon_flag,
p_daemon_type => l_daemon_type,
p_date_status_changed => l_sysdate,
p_date_booking_placed => l_date_booking_placed,
p_tdb_information_category => p_tdb_information_category,
p_tdb_information1 => p_tdb_information1,
p_tdb_information2 => p_tdb_information2,
p_tdb_information3 => p_tdb_information3,
p_tdb_information4 => p_tdb_information4,
p_tdb_information5 => p_tdb_information5,
p_tdb_information6 => p_tdb_information6,
p_tdb_information7 => p_tdb_information7,
p_tdb_information8 => p_tdb_information8,
p_tdb_information9 => p_tdb_information9,
p_tdb_information10 => p_tdb_information10,
p_tdb_information11 => p_tdb_information11,
p_tdb_information12 => p_tdb_information12,
p_tdb_information13 => p_tdb_information13,
p_tdb_information14 => p_tdb_information14,
p_tdb_information15 => p_tdb_information15,
p_tdb_information16 => p_tdb_information16,
p_tdb_information17 => p_tdb_information17,
p_tdb_information18 => p_tdb_information18,
p_tdb_information19 => p_tdb_information19,
p_tdb_information20 => p_tdb_information20,
p_failure_reason => p_failure_reason,
p_attendance_result => p_attendance_result,
p_successful_attendance_flag => p_successful_attendance_flag,
p_comments => p_comments
);
select function_id
from fnd_form_functions
where function_name = l_function_name;
select fr.menu_id, furg.responsibility_id,
furg.security_group_id, furg.responsibility_application_id
from fnd_responsibility fr,
fnd_user_resp_groups furg,
fnd_user fu
where fu.USER_ID = l_user_id
and fu.START_DATE <= sysdate
and (fu.END_DATE is null or fu.END_DATE > sysdate)
and furg.USER_ID = fu.USER_ID
and furg.START_DATE <= sysdate
and (furg.END_DATE is null or furg.END_DATE > sysdate)
and furg.RESPONSIBILITY_APPLICATION_ID = fr.APPLICATION_ID
and furg.RESPONSIBILITY_ID = fr.RESPONSIBILITY_ID
and fr.VERSION = 'W'
and fr.START_DATE <= sysdate
and (fr.END_DATE is null or fr.END_DATE > sysdate);
SELECT activity_version_id from ota_activity_versions
where Activity_version_id = l_activity_id;
SELECT activity_version_id,end_date from ota_activity_versions
where Activity_version_id = l_activity_id
and business_group_id = ota_general.get_business_group_id;
SELECT 1 from ota_offerings
where Activity_version_id = l_activity_id
and business_group_id = ota_general.get_business_group_id;
SELECT offering_id from ota_offerings
where offering_id = l_offering_id;
SELECT offering_id,end_date from ota_offerings
where offering_id = l_offering_id
and business_group_id = ota_general.get_business_group_id;
SELECT 1 from ota_events
where parent_offering_id = l_offering_id
and business_group_id = ota_general.get_business_group_id;
SELECT event_id from ota_events
where event_id = l_event_id;
SELECT event_id,
event_status,
ota_timezone_util.convert_date(trunc(nvl(course_start_date,sysdate)), nvl(course_start_time,'00:00'), timezone, fnd_timezones.get_client_timezone_code) course_start_date,
ota_timezone_util.convert_date(trunc(nvl(course_end_date,sysdate)), nvl(course_end_time,'23:59'), timezone, fnd_timezones.get_client_timezone_code) course_end_date,
ota_timezone_util.convert_date(trunc(nvl(enrolment_start_date,sysdate)), '00:00', timezone, fnd_timezones.get_client_timezone_code) enrolment_start_date,
ota_timezone_util.convert_date(trunc(nvl(enrolment_end_date,sysdate)), '23:59', timezone, fnd_timezones.get_client_timezone_code) enrolment_end_date,
course_end_time,
ota_timezone_util.convert_date(sysdate, to_char(sysdate,'HH24:MI'), ota_timezone_util.get_server_timezone_code, timezone) sys_date
from ota_events
where event_id = l_event_id
and event_type in ('SCHEDULED','SELFPACED')
and business_group_id=ota_general.get_business_group_id;
SELECT user_name
FROM fnd_user
WHERE employee_id = p_person_id;
SELECT employee_id
FROM fnd_user
WHERE user_id = l_current_userid;
SELECT full_name
FROM per_all_people_f p
WHERE person_id = l_display_person_id
and trunc(SYSDATE) between effective_start_date and effective_end_date;
SELECT a.supervisor_id, per.full_name
FROM per_all_assignments_f a,
per_all_people_f per
WHERE a.person_id = p_person_id
AND per.person_id = a.supervisor_id
AND a.primary_flag = 'Y'
AND trunc(sysdate)
BETWEEN a.effective_start_date AND a.effective_end_date
AND trunc(sysdate)
BETWEEN per.effective_start_date AND per.effective_end_date;
SELECT user_name
FROM fnd_user
WHERE employee_id = p_supervisor_id;