The following lines contain the word 'select', 'insert', 'update' or 'delete':
select hxc_attribute_type
(ta.TIME_ATTRIBUTE_ID,
p_block_id,
ta.ATTRIBUTE_CATEGORY,
ta.ATTRIBUTE1,
ta.ATTRIBUTE2,
ta.ATTRIBUTE3,
ta.ATTRIBUTE4,
ta.ATTRIBUTE5,
ta.ATTRIBUTE6,
ta.ATTRIBUTE7,
ta.ATTRIBUTE8,
ta.ATTRIBUTE9,
ta.ATTRIBUTE10,
ta.ATTRIBUTE11,
ta.ATTRIBUTE12,
ta.ATTRIBUTE13,
ta.ATTRIBUTE14,
ta.ATTRIBUTE15,
ta.ATTRIBUTE16,
ta.ATTRIBUTE17,
ta.ATTRIBUTE18,
ta.ATTRIBUTE19,
ta.ATTRIBUTE20,
ta.ATTRIBUTE21,
ta.ATTRIBUTE22,
ta.ATTRIBUTE23,
ta.ATTRIBUTE24,
ta.ATTRIBUTE25,
ta.ATTRIBUTE26,
ta.ATTRIBUTE27,
ta.ATTRIBUTE28,
ta.ATTRIBUTE29,
ta.ATTRIBUTE30,
ta.BLD_BLK_INFO_TYPE_ID,
ta.OBJECT_VERSION_NUMBER,
'N',
'N',
bbit.BLD_BLK_INFO_TYPE,
'N',
p_block_ovn)
from hxc_time_attribute_usages tau,
hxc_bld_blk_info_types bbit,
hxc_time_attributes ta
where tau.time_building_block_id = p_block_Id
and tau.time_building_block_ovn = p_block_ovn
and tau.time_attribute_id = ta.time_attribute_id
and (ta.attribute_category <> nvl(decode(p_load_template_attributes,'Y','TEMPLATES'),'$Sys_deF$')
and
ta.attribute_category <> nvl(decode(p_load_template_attributes,'Y','REASON'),'$Sys_deF$')
and
ta.attribute_category <> nvl(decode(p_load_template_attributes,'Y','SECURITY'),'$Sys_deF$')
)
and ta.bld_blk_info_type_id = bbit.bld_blk_info_type_id;
select hxc_block_type
(time_building_block_id,
type,
measure,
unit_of_measure,
fnd_date.date_to_canonical(start_time),
fnd_date.date_to_canonical(stop_time),
parent_building_block_id,
'N',
scope,
object_version_number,
approval_status,
resource_id,
resource_type,
approval_style_id,
fnd_date.date_to_canonical(date_from),
fnd_date.date_to_canonical(date_to),
comment_text,
parent_building_block_ovn,
'N',
'N',
'N',
application_set_id,
translation_display_key
)
from hxc_time_building_blocks
where time_building_block_id = p_block_id
and date_to = hr_general.end_of_time;
select hxc_block_type
(days.time_building_block_id,
days.type,
days.measure,
days.unit_of_measure,
fnd_date.date_to_canonical(days.start_time),
fnd_date.date_to_canonical(days.stop_time),
p_top_level_block_id,
'N',
days.scope,
days.object_version_number,
days.approval_status,
days.resource_id,
days.resource_type,
days.approval_style_id,
fnd_date.date_to_canonical(days.date_from),
fnd_date.date_to_canonical(days.date_to),
days.comment_text,
p_top_level_block_ovn,
'N',
'N',
'N',
days.application_set_id,
days.translation_display_key),
days.time_building_block_id,
days.object_version_number
from hxc_time_building_blocks days,
hxc_time_building_blocks top_level
where top_level.time_building_block_id = p_top_level_block_id
and top_level.object_version_number = p_top_level_block_ovn
and days.resource_id = top_level.resource_id
and trunc(days.start_time) between trunc(top_level.start_time) and trunc(top_level.stop_time)
and days.scope = 'DAY'
and days.date_to = hr_general.end_of_time
and days.start_time >= p_start_time
and days.stop_time <= p_stop_time
and exists
(select 'Y'
from hxc_time_building_blocks timecard_check
where timecard_check.scope = 'TIMECARD'
and timecard_check.resource_id = days.resource_id
and timecard_check.date_to = hr_general.end_of_time
and timecard_check.time_building_block_id = days.parent_building_block_id
and timecard_check.object_version_number = days.parent_building_block_ovn
)
order by days.start_time;
select hxc_block_type
(days.time_building_block_id,
days.type,
days.measure,
days.unit_of_measure,
fnd_date.date_to_canonical(days.start_time),
fnd_date.date_to_canonical(days.stop_time),
days.parent_building_block_id,
'N',
days.scope,
days.object_version_number,
days.approval_status,
days.resource_id,
days.resource_type,
days.approval_style_id,
fnd_date.date_to_canonical(days.date_from),
fnd_date.date_to_canonical(days.date_to),
days.comment_text,
days.parent_building_block_ovn,
'N',
'N',
'N',
days.application_set_id,
days.translation_display_key),
days.time_building_block_id,
days.object_version_number
from hxc_time_building_blocks days,
hxc_time_building_blocks top_level
where top_level.time_building_block_id = p_top_level_block_id
and top_level.object_version_number = p_top_level_block_ovn
and days.parent_building_block_id = top_level.time_building_block_Id
and days.parent_building_block_ovn = top_level.object_version_number
and days.object_version_number = (select max(object_version_number)
from hxc_time_building_blocks days_ovn
where days_ovn.time_building_block_id = days.time_building_block_id
and days_ovn.parent_building_block_id = top_level.time_building_block_Id
and days_ovn.parent_building_block_ovn = top_level.object_version_number)
order by days.start_time;
select hxc_block_type
(details.time_building_block_id,
details.type,
details.measure,
details.unit_of_measure,
fnd_date.date_to_canonical(details.start_time),
fnd_date.date_to_canonical(details.stop_time),
details.parent_building_block_id,
'N',
details.scope,
details.object_version_number,
details.approval_status,
details.resource_id,
details.resource_type,
details.approval_style_id,
fnd_date.date_to_canonical(details.date_from),
fnd_date.date_to_canonical(details.date_to),
details.comment_text,
details.parent_building_block_ovn,
'N',
'N',
'N',
details.application_set_id,
details.translation_display_key),
details.time_building_block_id,
details.object_version_number
from hxc_time_building_blocks details,
hxc_time_building_blocks days,
hxc_ap_detail_links adl
where details.time_building_block_id = adl.time_building_block_id
and details.object_version_number = adl.time_building_block_ovn
and days.start_time >= p_start_time
and days.stop_time <= p_stop_time
and days.time_building_block_id = details.parent_building_block_id
and days.object_version_number = details.parent_building_block_ovn
and adl.application_period_id = p_app_period_id
and details.date_to = hr_general.end_of_time;
select hxc_block_type
(details.time_building_block_id,
details.type,
details.measure,
details.unit_of_measure,
fnd_date.date_to_canonical(details.start_time),
fnd_date.date_to_canonical(details.stop_time),
details.parent_building_block_id,
'N',
details.scope,
details.object_version_number,
details.approval_status,
details.resource_id,
details.resource_type,
details.approval_style_id,
fnd_date.date_to_canonical(details.date_from),
fnd_date.date_to_canonical(details.date_to),
details.comment_text,
details.parent_building_block_ovn,
'N',
'N',
'N',
details.application_set_id,
details.translation_display_key)
from hxc_time_building_blocks details
where details.parent_building_block_id = p_day_id
and details.parent_building_block_ovn = p_day_ovn
and details.date_to = hr_general.end_of_time;
select start_time,
stop_time
from hxc_app_period_summary
where application_period_id = p_application_period_id;
select hxc_attribute_type
(-2,
p_blocks(1).time_building_block_id,
'APPROVAL',
favtl.application_name,
'',
p.full_name,
'',
'',
'',
hr_general.decode_lookup('HXC_APPROVAL_STATUS', apsum.approval_status),
'',
'',
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
'' ,
bbit.bld_blk_info_type_id,
1,
'N',
'N',
bbit.bld_blk_info_type,
'N',
p_blocks(1).object_version_number
)
from hxc_app_period_summary apsum,
fnd_application_tl favtl,
hxc_time_recipients htr,
per_all_people_f p,
hxc_bld_blk_info_types bbit
where apsum.application_period_id = p_app_period_id
and favtl.application_id = htr.application_id
and htr.time_recipient_id = apsum.time_recipient_id
and favtl.language = userenv('LANG')
and p.person_id (+) = apsum.approver_id
and p.effective_end_date (+) = hr_general.end_of_time
and bbit.bld_blk_info_type = 'APPROVAL';
daysselected pls_integer;
daysselected := l_day_id_list.count;
if(daynum <> daysselected) then
-- Add missing days
add_missing_days
(p_blocks,
p_start_time,
p_stop_time
);