The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT tcbb.resource_id,
tcbb.start_time,
tcbb.stop_time
FROM HXC_TIME_BUILDING_BLOCKS tcbb
WHERE tcbb.time_building_block_id = b_tc_bbid
and tcbb.object_version_number = b_tc_bbovn;
SELECT apbb.resource_id,
apbb.start_time,
apbb.stop_time,
ta.attribute1 recipient_app
FROM HXC_TIME_ATTRIBUTES ta,
HXC_TIME_ATTRIBUTE_USAGES tau,
HXC_TIME_BUILDING_BLOCKS apbb
WHERE apbb.time_building_block_id = b_ap_bbid
and apbb.object_version_number = b_ap_bbovn
and tau.time_building_block_id =
apbb.time_building_block_id
and tau.time_building_block_ovn =
apbb.object_version_number
and ta.time_attribute_id =
tau.time_attribute_id;
SELECT apc.approval_mechanism,
apc.approval_mechanism_id,
apc.wf_item_type,
apc.wf_name
FROM HXC_APPROVAL_COMPS apc,
HXC_APPROVAL_STYLES aps,
HXC_TIME_BUILDING_BLOCKS htb_time,
hxc_time_building_blocks htb_appln
WHERE htb_appln.TIME_BUILDING_BLOCK_ID = b_ap_bbid AND
htb_appln.object_version_number = b_ap_bbovn
AND
htb_time.resource_id = htb_appln.resource_id AND
htb_time.start_time <= htb_appln.stop_time AND
htb_time.stop_time >= htb_appln.start_time AND
htb_time.scope = 'TIMECARD' AND
htb_time.date_to = hr_general.end_of_time
AND
aps.approval_style_id = htb_time.approval_style_id
AND
apc.approval_style_id = aps.approval_style_id AND
apc.time_recipient_id = b_time_recipient_id;
select p.full_name from per_people_f p
where p.person_id=b_person_id
and b_effective_date between p.effective_start_date and p.effective_end_date;
select full_name
from per_all_people_f
where person_id = b_person_id
and (effective_end_date=(select max(effective_end_date) from per_all_people_f
where person_id=b_person_id and(effective_end_date<= b_effective_date)));
select full_name
from per_all_people_f
where person_id = b_person_id
and (effective_start_date=(select min(effective_start_date) from per_all_people_f
where person_id=b_person_id and
(effective_start_date>= b_effective_date)));
select asg.supervisor_id
from per_all_assignments_f asg
where asg.person_id = b_person_id
and TRUNC(b_effective_date) between TRUNC(asg.effective_Start_date) and TRUNC(asg.effective_end_date)
and asg.primary_flag = 'Y'
and asg.assignment_type in ('E','C');
select user_name from fnd_user
where user_id=p_usr_id;
select wiav.item_key
from wf_item_attribute_values wiav
where wiav.item_type = 'HXCEMP'
and wiav.name = 'APP_BB_ID'
and wiav.NUMBER_VALUE = p_app_bb_id;
select approval_item_key
from hxc_app_period_summary
where application_period_id = p_app_bb_id;
select distinct apps.time_building_block_id
from hxc_time_building_blocks apps
,hxc_time_building_blocks refapps
where refapps.resource_id = apps.resource_id
and refapps.scope = apps.scope
and refapps.date_to = hr_general.end_of_time
and refapps.start_time <= apps.stop_time
and refapps.stop_time >= apps.start_time
and ((refapps.time_building_block_id <> apps.time_building_block_id)
OR
((refapps.object_version_number <> apps.object_version_number)
AND
(refapps.time_building_block_id = apps.time_building_block_id))
)
and refapps.time_building_block_id = p_app_bb_id
and refapps.object_version_number = p_app_bb_ovn;
SELECT time_building_block_id
FROM hxc_time_building_blocks
WHERE scope = 'APPLICATION_PERIOD'
AND resource_id = p_resource_id
AND date_to = hr_general.end_of_time
AND TRUNC(start_time) <= TRUNC(p_tc_stop_time)
AND TRUNC(stop_time) >= TRUNC(p_tc_start_time);
SELECT aps.application_period_id
FROM hxc_tc_ap_links tcl, hxc_app_period_summary aps
WHERE tcl.timecard_id = p_timecard_id
AND tcl.application_period_id = aps.application_period_id
AND aps.notification_status = 'NOTIFIED';
SELECT apc.approval_mechanism,
apc.approval_mechanism_id,
apc.wf_item_type,
apc.wf_name
FROM hxc_app_period_summary apsum
,hxc_approval_comps apc
WHERE apsum.application_period_id = p_ap_bb_id
AND apsum.application_period_ovn = p_ap_bb_ovn
AND apsum.approval_comp_id = apc.approval_comp_id
-- Bug 10421528 -- Commented this regression
-- AND apsum.time_recipient_id = apc.time_recipient_id; -- Added time recipient check for bug 9747501
OR ( EXISTS ( SELECT 1
FROM hxc_approval_comps apc2
WHERE apc2.approval_comp_id = apc.parent_comp_id
AND apc2.approval_mechanism = 'ENTRY_LEVEL_APPROVAL'
AND apc2.time_recipient_id = apsum.time_recipient_id
)
)
);
SELECT apc.approval_mechanism,
apc.approval_mechanism_id,
apc.wf_item_type,
apc.wf_name
FROM hxc_app_period_summary apsum
,hxc_approval_comps apc
,hxc_tc_ap_links tcl
,hxc_time_building_blocks tbb
WHERE apsum.application_period_id = p_application_period_id
AND apsum.application_period_ovn = p_application_period_ovn
and apsum.application_period_id = tcl.application_period_id
and tcl.timecard_id = tbb.time_building_block_id
and tbb.scope = 'TIMECARD'
and tbb.date_to = hr_general.end_of_time
and tbb.approval_style_id = apc.approval_style_id
and apsum.time_recipient_id = apc.time_recipient_id;
SELECT tcsum.resource_id,
tcsum.start_time,
tcsum.stop_time
FROM hxc_timecard_summary tcsum
WHERE tcsum.timecard_id = p_tc_bbid;
SELECT hta.attribute1
FROM hxc_ap_detail_links apdet
,hxc_time_building_blocks htbb
,hxc_time_attribute_usages htau
,hxc_time_attributes hta
WHERE apdet.application_period_id = p_ap_bb_id
AND apdet.time_building_block_id = htbb.time_building_block_id
AND htbb.date_to = hr_general.end_of_time
AND htbb.time_building_block_id = htau.time_building_block_id
AND htbb.object_version_number = htau.time_building_block_ovn
AND htau.time_attribute_id = hta.time_attribute_id
AND hta.attribute_category = 'PROJECTS';
cursor c_project_id_deleted_detail
(p_app_bb_id in hxc_time_building_blocks.time_building_block_id%type) is
select to_number(ta.attribute1)
from hxc_time_building_blocks details,
hxc_time_building_blocks days,
hxc_time_attribute_usages tau,
hxc_app_period_summary aps,
hxc_time_Attributes ta
where aps.application_period_id = p_app_bb_id
and aps.start_time <= days.stop_time
and aps.stop_time >= days.start_time
and aps.resource_id = days.resource_Id
and details.parent_building_block_Id = days.time_building_block_id
and details.parent_building_block_ovn = days.object_version_number
and details.date_to <> hr_general.end_of_time
and details.object_version_number =
(select max(details2.object_version_number)
from hxc_time_building_blocks details2
where details.time_building_block_id = details2.time_building_block_id)
and details.time_building_block_id = tau.time_building_block_id
and details.object_version_number = tau.time_building_block_ovn
and tau.time_Attribute_Id = ta.time_attribute_id
and ta.attribute_category = 'PROJECTS'
and not exists
(select 1
from hxc_ap_detail_links adl
where adl.application_period_id = aps.application_period_id
and adl.time_building_block_id = details.time_building_block_id
and adl.time_building_block_ovn = details.object_version_number
);
open c_project_id_deleted_detail(l_ap_bb_id);
fetch c_project_id_deleted_detail into l_project_id;
close c_project_id_deleted_detail;
SELECT tcsum.resource_id,
tcsum.start_time,
tcsum.stop_time
FROM hxc_timecard_summary tcsum
WHERE tcsum.timecard_id = p_tc_bbid;
SELECT name
FROM hxc_approval_styles
WHERE approval_style_id = p_app_style_id;
SELECT adl.TIME_BUILDING_BLOCK_ID bb_id,
adl.TIME_BUILDING_BLOCK_OVN ovn
FROM hxc_time_building_blocks tbb
, hxc_ap_detail_links adl
WHERE adl.APPLICATION_PERIOD_ID = p_app_per_id
AND
tbb.time_building_block_id = adl.time_building_block_id AND
tbb.object_version_number = adl.time_building_block_ovn AND
tbb.date_to = hr_general.end_of_time;
SELECT resource_id
FROM hxc_time_building_blocks tbb
WHERE tbb.time_building_block_id = p_app_per_id;
SELECT tbb.start_time ,tbb.stop_time
FROM hxc_tc_ap_links htl,
hxc_time_building_blocks tbb
WHERE htl.application_period_id = p_app_per_id
AND tbb.time_building_block_id = htl.timecard_id;
select date_start from per_periods_of_service where person_id=p_resource_id order by date_start desc;
select details.time_building_block_id bb_id, details.object_version_number ovn
from hxc_time_building_blocks timecard,
hxc_time_building_blocks details,
hxc_time_building_blocks days
where timecard.time_building_block_id = days.parent_building_block_id
and timecard.object_version_number = days.parent_building_block_ovn
and days.time_building_block_id = details.parent_building_block_id
and days.object_version_number = details.parent_building_block_ovn
and details.date_to = hr_general.end_of_time
and days.start_time <=p_end_date
and days.stop_time >= p_start_date
and days.resource_id = p_resource_id
and details.scope = 'DETAIL'
and timecard.scope = 'TIMECARD';
select name,text_value
from wf_item_attribute_values
where item_type = 'HXCEMP'
and item_key = p_item_key;
SELECT 1
FROM per_all_people_f per,
per_person_types ppt,
per_person_type_usages_f pptu
WHERE per.person_id = b_person_id
AND TRUNC(b_effective_date) between TRUNC(per.effective_Start_date) and TRUNC(per.effective_end_date)
AND TRUNC(b_effective_date) between TRUNC(pptu.effective_Start_date) and TRUNC(pptu.effective_end_date)
AND pptu.person_id = per.person_id
AND pptu.person_type_id = ppt.person_type_id
AND ppt.system_person_type in ('EMP','CWK');
select htr.extension_function2
from hxc_time_recipients htr
where htr.time_recipient_id = p_time_recipient;
select 'Y'
from hxc_tc_ap_links tcl,
hxc_ap_detail_links adl
where tcl.timecard_id = l_tc_bb_id
and tcl.application_period_id = adl.application_period_id
and rownum < 2;
SELECT 'Y'
FROM hxc_app_period_summary
WHERE time_category_id = 0
AND APPLICATION_PERIOD_ID = l_ap_bb_id
AND approval_comp_id = (SELECT approval_comp_id
FROM hxc_approval_comps
WHERE approval_style_id =
(SELECT approval_style_id
FROM hxc_approval_styles
WHERE NAME = 'SEEDED_APPL_PA_MGR')
AND time_category_id = 0);
select text_value
from wf_item_attribute_values
where item_type = p_itemtype
and item_key = p_itemkey
and name = 'RESULT';
select approval_comp_id
from hxc_app_period_summary
where application_period_id = p_app_bb_id
and application_period_ovn = p_app_bb_ovn;
select count(*) into l_count
from fnd_user
where user_name = l_tc_user_name
and TRUNC(sysdate) between TRUNC(start_date) and NVL(TRUNC(end_date), TRUNC(sysdate));
procedure formula_selects_mechanism(
p_itemtype in varchar2,
p_itemkey in varchar2,
p_actid in number,
p_funcmode in varchar2,
p_result in out nocopy varchar2)
is
l_proc varchar2(61);
l_proc := g_pkg || '.' || 'formula_selects_mechanism';
end formula_selects_mechanism;
SELECT hxc_approval_wf_s.nextval
INTO l_item_key
FROM DUAL;