The following lines contain the word 'select', 'insert', 'update' or 'delete':
select a.resubmit_interval,a.resubmit_end_date
from fnd_concurrent_requests a, fnd_concurrent_programs b
where a.concurrent_program_id = b.concurrent_program_id
and b.concurrent_program_name = p_name
and b.application_id = 810
and a.status_code ='I'
and a.hold_flag ='N'
and rownum=1
order by a.request_id desc;
is select count(resource_booking_id)
from ota_resource_bookings
where event_id = peventid;
SELECT waav.text_value FROM WF_ACTIVITY_ATTR_VALUES WAAV
WHERE WAAV.PROCESS_ACTIVITY_ID = (select max(instance_id) from
wf_process_activities wpa where wpa.process_name =
'OTA_COMPETENCE_UPDATE_JSP_PRC'
and wpa.activity_name = 'OTA_COMPETENCE_NOTIFY_APPROVAL'
and wpa.instance_label = 'OTA_COMPETENCE_NOTIFY_APPROVAL'
and wpa.process_version = wpa.process_version
and wpa.process_item_type = 'HRSSA' )
AND WAAV.NAME = 'HR_APPROVAL_REQ_FLAG' ;
select text_default from wf_activity_attributes where NAME = 'HR_APPROVAL_REQ_FLAG'
and activity_item_type = 'HRSSA'
and activity_name = 'OTA_COMPETENCE_NOTIFY_APPROVAL';
select oav.competency_update_level from
ota_activity_versions oav
--, ota_offerings off
where oav.activity_version_id = p_obj_id;
l_return_value := get_lookup_meaning('OTA_COMPETENCY_UPDATE_LEVEL',l_lookup_value,810);
is select count(event_id) from
ota_events where
parent_event_id = peventid and
parent_event_id is not null;
select tav.version_name,
evt.Title,
evt.Course_Start_Date,
evt.Course_End_Date,
tdb.delegate_contact_id
From
ota_Delegate_bookings tdb,
ota_Events_vl evt, --MLS change _vl added
ota_activity_versions_tl tav -- MLS change _tl added
Where
evt.event_id = tdb.event_id and
tdb.line_id = p_line_id and
evt.activity_version_id = tav.activity_version_id;
Select full_name
From
ota_customer_contacts_v
Where
contact_id = l_contact_id;
Select
tav.version_name,
evt.title,
evt.Course_Start_Date,
evt.course_End_Date,
evt.Maximum_Attendees
FROM ota_events_vl evt, -- MLS change _vl added
ota_activity_versions_tl tav --MLS change _tl added
WHERE evt.line_id = p_line_id and
evt.activity_version_id = tav.activity_version_id;
select value
from v$parameter
where name ='nls_date_format';
SELECT
invoicing_rule_id
FROM
oe_order_lines_all
WHERE
line_id = p_line_id;
SELECT Type
FROM OTA_BOOKING_STATUS_TYPES
WHERE booking_status_type_id = p_status_type_id;
Select null
FROM
OTA_DELEGATE_BOOKINGS
WHERE
Line_id = p_line_id;
Select null
FROM
OTA_EVENTS
WHERE
Line_id = p_line_id;
select meaning
from hr_lookups
where lookup_type = p_lookup_type
and lookup_code = p_lookup_code
and enabled_flag = 'Y';
SELECT
decode(invoiced_quantity,null,0,invoiced_quantity)
FROM
oe_order_lines_all
WHERE
line_id = p_line_id;
SELECT null
FROM wf_item_activity_statuses_v wf
WHERE activity_name = p_activity
AND activity_status_code = 'NOTIFIED'
AND item_type = 'OEOL'
AND item_key = to_char(p_line_id);
select bst.type
from ota_delegate_bookings db,
ota_booking_status_types bst,
ota_events ev,
ota_events evt
where db.delegate_person_id = p_delegate_person_id
and db.booking_status_type_id = bst.booking_status_type_id
and bst.type <> g_cancelled_booking
and db.event_id = ev.event_id
and evt.event_id = p_event_id
and ev.event_id <> p_event_id
and ((
ev.course_start_date = ev.course_end_date and
evt.course_start_date = evt.course_end_date and
ev.course_start_date = evt.course_start_date and
nvl(evt.course_start_time, '-99:99') <= nvl(ev.course_end_time, '99:99') and
nvl(evt.course_end_time, '99:99') >= nvl(ev.course_start_time, '-99:99')
)
or (
(ev.course_start_date <> ev.course_end_date or
evt.course_start_date <> evt.course_end_date) and
ev.course_start_date <= evt.course_end_date and
ev.course_end_date >= evt.course_start_date
))
order by bst.type;
select bst.type
from ota_delegate_bookings db,
ota_booking_status_types bst,
ota_events ev,
ota_events evt
where db.delegate_contact_id = p_delegate_contact_id
and db.booking_status_type_id = bst.booking_status_type_id
and bst.type <> g_cancelled_booking
and db.event_id = ev.event_id
and evt.event_id = p_event_id
and ev.event_id <> p_event_id
and ev.course_start_date <= evt.course_end_date
and ev.course_end_date >= evt.course_start_date
order by bst.type;
SELECT bg.name
FROM hr_all_organization_units org,
hr_all_organization_units bg
WHERE org.business_group_id = bg.organization_id
AND org.organization_id = p_organization_id;
SELECT lookup.meaning Dm_Name,
catusg.category Dm_Code
FROM ota_act_cat_inclusions actcat,
ota_category_usages catusg,
hr_lookups lookup
WHERE actcat.category_usage_id= catusg.category_usage_id
AND actcat.primary_flag='Y'
AND catusg.category = lookup.lookup_code
AND lookup.lookup_type ='ACTIVITY_CATEGORY'
AND catusg.type='DM'
AND actcat.activity_version_id = p_activity_version_id;
SELECT lookup.meaning dm_name,
catusg.category dm_code
FROM ota_act_cat_inclusions actcat,
ota_category_usages catusg,
hr_lookups lookup
WHERE actcat.category_usage_id= catusg.category_usage_id
AND catusg.category = lookup.lookup_code
AND lookup.lookup_type ='ACTIVITY_CATEGORY'
AND catusg.type='DM'
AND actcat.activity_version_id = p_activity_version_id;
SELECT meaning
FROM hr_lookups
WHERE lookup_type ='ACTIVITY_CATEGORY'
AND lookup_code = 'INCLASS';
select ocu.category
from ota_category_usages_tl ocu , ota_offerings oaf
where oaf.delivery_mode_id = ocu.category_usage_id
and oaf.offering_id = p_offering_id
and ocu.Language = USERENV('LANG');
SELECT COUNT(booking_id)
INTO l_num_waitlisted
FROM ota_delegate_bookings tdb
WHERE tdb.event_id = p_event_id
AND tdb.booking_status_type_id IN (SELECT bst.booking_status_type_id
FROM ota_booking_status_types bst
WHERE bst.type = 'W');
SELECT tdb.booking_id
FROM ota_delegate_bookings tdb,
ota_booking_status_types bst
WHERE tdb.booking_status_type_id = bst.booking_status_type_id
AND bst.type = 'W'
AND tdb.event_id = p_event_id
ORDER BY tdb.date_booking_placed;
SELECT tdb.booking_id
FROM ota_delegate_bookings tdb,
ota_booking_status_types bst
WHERE tdb.booking_status_type_id = bst.booking_status_type_id
AND bst.type = 'W'
AND tdb.event_id = p_event_id
ORDER BY tdb.booking_priority,
tdb.booking_id;
SELECT s.location_id
FROM ota_suppliable_resources s,
ota_resource_bookings r
WHERE r.supplied_resource_id = s.supplied_resource_id
AND r.event_id = p_event_id
AND primary_venue_flag = 'Y';
SELECT e.location_id,
e.training_center_id
FROM ota_events e
WHERE e.event_id = p_event_id;
SELECT o.location_id
FROM hr_all_organization_units o
WHERE o.organization_id = p_training_center_id;
SELECT employee_id
FROM fnd_user
WHERE user_id = fnd_profile.value('USER_ID');
SELECT DECODE(per.last_name, NULL, NULL, per.last_name)||
DECODE(per.title, NULL, DECODE(per.first_name, NULL, NULL, ', '), ', '||per.title)||
--Modified for Bug#2997820
--DECODE(per.first_name,NULL,NULL, per.last_name) full_name
DECODE(per.first_name,NULL,NULL, per.first_name) full_name
FROM per_all_people_f per, fnd_user u
WHERE per.person_id = u.employee_id
AND (per.effective_end_date >= DECODE(p_course_end_date, NULL, TRUNC(SYSDATE), p_course_end_date) AND
per.effective_start_date <= DECODE(p_course_start_date, NULL, TRUNC(SYSDATE), p_course_start_date))
AND u.user_id = p_authorizer_id;
SELECT decode(fnd_profile.value('BEN_DISPLAY_EMPLOYEE_NAME'),'FN',per.full_name,
per.first_name||' '|| per.last_name||' '||per.suffix) FULL_NAME
FROM per_all_people_f per, fnd_user u
WHERE per.person_id = u.employee_id
AND u.user_id = p_authorizer_id
AND trunc(SYSDATE) between per.effective_start_date and per.effective_end_date;
SELECT lookup.meaning Dm_Name,
catusg.category Dm_Code
FROM ota_act_cat_inclusions actcat,
ota_category_usages catusg,
hr_lookups lookup
WHERE actcat.category_usage_id= catusg.category_usage_id
AND actcat.primary_flag='Y'
AND catusg.category = lookup.lookup_code
AND lookup.lookup_type ='ACTIVITY_CATEGORY'
AND catusg.type='C'
AND actcat.activity_version_id = p_activity_version_id;
SELECT lookup.meaning dm_name,
catusg.category dm_code
FROM ota_act_cat_inclusions actcat,
ota_category_usages catusg,
hr_lookups lookup
WHERE actcat.category_usage_id= catusg.category_usage_id
AND catusg.category = lookup.lookup_code
AND lookup.lookup_type ='ACTIVITY_CATEGORY'
AND catusg.type='C'
AND actcat.activity_version_id = p_activity_version_id;
SELECT count(*)
FROM ota_offerings
WHERE learning_object_id = p_learning_object_id;
SELECT count(*)
FROM ota_offerings
WHERE activity_version_id = p_activity_version_id;
SELECT rco_id
FROM ota_activity_versions
WHERE activity_version_id = p_activity_version_id;
SELECT count(event_id)
FROM ota_events
WHERE parent_offering_id = p_offering_id and
offering_id is not null;
SELECT count(event_id)
FROM ota_events
WHERE parent_offering_id = p_offering_id and
event_type in ('SELFPACED','SCHEDULED') and
book_independent_flag = 'N';
SELECT count(*)
FROM ota_question_banks
WHERE folder_id = p_folder_id;
SELECT DECODE(BST.type,'C','Y',BST.type) status, BST.name
FROM ota_booking_status_types_vl BST,
ota_delegate_bookings ODB
WHERE ODB.event_id = p_event_id
AND (p_delegate_person_id IS NOT NULL AND ODB.delegate_person_id = p_delegate_person_id
OR p_delegate_contact_id IS NOT NULL and ODB.delegate_contact_id = p_delegate_contact_id)
AND ODB.booking_status_type_id = BST.booking_status_type_id
ORDER BY status;
select
p.full_name person_name
from per_people_f p
where
p.person_id = p_user_id
and sysdate between p.effective_start_date and p.effective_end_date;
select
p.party_name person_name
from hz_parties p
where
p.party_id = p_user_id;
select
p.full_name person_name
from per_people_f p , fnd_user fus
where p.person_id = fus.employee_id
and
fus.user_id = p_user_id;
select pap.full_name from per_all_people_f pap
where pap.person_id = p_person_id
and trunc(sysdate) between nvl(pap.effective_start_date, trunc(sysdate))
and nvl(pap.effective_end_date, trunc(sysdate));
SELECT
SUBSTRB( PARTY.PERSON_LAST_NAME,1,50) || ' ' ||
SUBSTRB( PARTY.PERSON_FIRST_NAME,1,40) || ' ' ||
HR_GENERAL.DECODE_AR_LOOKUP('CONTACT_TITLE',nvl(PARTY.PERSON_PRE_NAME_ADJUNCT,PARTY.PERSON_TITLE)) LEARNER_NAME
FROM
HZ_CUST_ACCOUNT_ROLES ACCT_ROLE,
HZ_PARTIES PARTY,
HZ_RELATIONSHIPS REL,
HZ_CUST_ACCOUNTS ROLE_ACCT
WHERE
ACCT_ROLE.PARTY_ID = REL.PARTY_ID
AND ACCT_ROLE.ROLE_TYPE = 'CONTACT'
AND REL.SUBJECT_ID = PARTY.PARTY_ID
AND REL.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
AND REL.OBJECT_TABLE_NAME = 'HZ_PARTIES'
AND ROLE_ACCT.PARTY_ID = REL.OBJECT_ID
AND ACCT_ROLE.CUST_ACCOUNT_ID = ROLE_ACCT.CUST_ACCOUNT_ID
AND ACCT_ROLE.CUST_ACCOUNT_ID = l_customer_id
AND ACCT_ROLE.CUST_ACCOUNT_ROLE_ID = p_contact_id;
select ACCT_ROLE.cust_account_id CUSTOMER_ID
from HZ_CUST_ACCOUNT_ROLES acct_role,
HZ_PARTIES party,
HZ_RELATIONSHIPS rel,
HZ_ORG_CONTACTS org_cont,
HZ_PARTIES rel_party,
HZ_CUST_ACCOUNTS role_acct
where acct_role.party_id = rel.party_id
and acct_role.role_type = 'CONTACT'
and org_cont.party_relationship_id = rel.relationship_id
and rel.subject_id = party.party_id
and rel.party_id = rel_party.party_id
and rel.subject_table_name = 'HZ_PARTIES'
and rel.object_table_name = 'HZ_PARTIES'
and acct_role.cust_account_id = role_acct.cust_account_id
and role_acct.party_id = rel.object_id
and ACCT_ROLE.cust_account_role_id = p_contact_id;
select name from hr_all_organization_units_tl
where language = userenv('LANG') and organization_id = p_organization_id;
select substrb(party.party_name,1,50)
from hz_parties party
,hz_cust_accounts cust_acct
where
cust_acct.party_id = party.party_id
and cust_acct.cust_account_id = l_customer_id;
select nvl(parent_cat_usage_id,-1)
from ota_category_usages
where category_usage_id = current_cat_usage_id;
select nvl(parent_learning_object_id,-1)
from ota_learning_objects
where learning_object_id = current_lo_id;
select folder_id
from ota_learning_objects
where learning_object_id = current_lo_id;
select nvl(parent_folder_id,-1)
from ota_lo_folders
where folder_id = current_folder_id;
SELECT event_status from ota_events
where
event_id = p_event_id;
SELECT ppt.system_person_type
FROM per_all_people_f per,
per_person_type_usages_f ptu,
per_person_types ppt
WHERE
per.person_id = p_person_id
AND ptu.person_id = per.person_id
AND ppt.business_group_id = per.business_group_id
AND ptu.person_type_id = ppt.person_type_id
AND trunc(sysdate) between per.effective_start_date AND per.effective_end_date
AND trunc(sysdate) between ptu.effective_start_date AND ptu.effective_end_date
AND ppt.system_person_type <> 'APL'
AND ppt.system_person_type in ('EMP','CWK');
select party.party_id
from HZ_CUST_ACCOUNT_ROLES acct_role,
HZ_PARTIES party,
HZ_RELATIONSHIPS rel,
HZ_ORG_CONTACTS org_cont,
HZ_PARTIES rel_party,
HZ_CUST_ACCOUNTS role_acct
where acct_role.party_id = rel.party_id
and acct_role.role_type = 'CONTACT'
and org_cont.party_relationship_id = rel.relationship_id
and rel.subject_id = party.party_id
and rel.party_id = rel_party.party_id
and rel.subject_table_name = 'HZ_PARTIES'
and rel.object_table_name = 'HZ_PARTIES'
and acct_role.cust_account_id = role_acct.cust_account_id
and role_acct.party_id = rel.object_id
and ACCT_ROLE.cust_account_role_id = p_delegate_contact_id;
SELECT null
FROM ota_events
WHERE event_id = p_class_id
--AND trunc(sysdate) between enrolment_start_date and nvl(enrolment_end_date, trunc(sysdate))
AND ota_timezone_util.convert_date(sysdate, to_char(sysdate,'HH24:MI'), ota_timezone_util.get_server_timezone_code, timezone)
BETWEEN to_date(to_char(nvl(enrolment_start_date,trunc(sysdate)),'YYYY/MM/DD') || ' ' || '00:00' , 'YYYY/MM/DD HH24:MI')
AND to_date(to_char(nvl(enrolment_end_date,to_date('4712/12/31','YYYY/MM/DD')),'YYYY/MM/DD') || ' ' || '23:59', 'YYYY/MM/DD HH24:MI')
AND event_type IN ('SCHEDULED', 'SELFPACED')
AND event_status IN ('N', 'P', 'F');
SELECT null
FROM ota_learning_paths
WHERE learning_path_id = p_learning_path_id
AND trunc(sysdate) between start_date_active and nvl(end_date_active, trunc(sysdate));
SELECT null
from ota_lp_sections lpc,
ota_learning_path_members lpm
where lpc.learning_path_id = p_learning_path_id
and lpc.learning_path_section_id = lpm.learning_path_section_id
and lpc.completion_type_code in ('M','S');
SELECT null
FROM ota_certifications_b crb
, ota_certification_members crm
WHERE crb.certification_id = crm.certification_id
AND crb.certification_id = p_certification_id
AND trunc(sysdate) between crb.start_date_active and nvl(crb.end_date_active, trunc(sysdate))
-- Added for bug#4617609, modified for 4940007
and ((crb.renewable_flag = 'N' and trunc(sysdate) <= nvl( crb.INITIAL_COMPLETION_DATE ,trunc(sysdate)))
or crb.renewable_flag = 'Y');
SELECT null
FROM ota_event_associations
WHERE event_id = p_event_id
AND customer_id IS NOT NULL;
SELECT NULL
FROM per_all_assignments_f
WHERE person_id = p_person_id
AND trunc(sysdate) between effective_start_date and effective_end_date
AND organization_id = p_sponsor_org_id
AND assignment_type in ('E', 'C', 'A');
SELECT l.lookup_code
FROM fnd_lookup_values l
WHERE l.lookup_type = 'ENROLMENT_STATUS_REASON'
AND l.meaning = p_meaning
AND l.enabled_flag = 'Y'
and rownum=1;
SELECT bsh.comments
FROM ota_booking_status_histories bsh
WHERE bsh.booking_id = p_booking_id
AND bsh.start_date =
(SELECT MAX(start_date)
FROM ota_booking_status_histories
WHERE booking_id = p_booking_id);
SELECT meaning
FROM hr_lookups
WHERE lookup_type = 'ENROLMENT_STATUS_REASON'
AND enabled_flag = 'Y'
AND lookup_code = p_lookup_code;
select name
from ota_natural_languages_v
where language_code = p_language_code;