The following lines contain the word 'select', 'insert', 'update' or 'delete':
select lkp.meaning
into l_union_membership
from per_all_assignments_f asg
,hr_soft_coding_keyflex scl
,hr_lookups lkp
where lkp.lookup_type = 'DK_UNION_MEMBERSHIP'
and lkp.lookup_code = scl.segment5
and lkp.enabled_flag = 'Y'
and asg.soft_coding_keyflex_id = scl.soft_coding_keyflex_id
and p_effective_date between asg.effective_start_date and effective_end_date
and asg.assignment_id = p_assignment_id;
select pea.segment1
into l_bank_reg_number
from pay_external_accounts pea
where pea.external_account_id=p_external_account_id;
'Select org.name COL01
,job.name COL02
,loc.location_code COL03
,grd.name COL04
,pay.payroll_name COL05
,pos.name COL06
,hr_general.decode_organization(:tax_unit_id) COL07
,pg.group_name COL08
,peo.national_identifier COL09
,employee_number COL10
,hl.meaning COL11
,assignment_number COL12
,nvl(ppb1.salary,''0'') COL13
,peo.FIRST_NAME COL14
,peo.MIDDLE_NAMES COL15
,peo.LAST_NAME COL16
,nvl(pay_dk_soe.get_cvr_or_pension(:assignment_id,:effective_date,''DK_LEGAL_ENTITY_DETAILS''), '''') COL17
,nvl(pay_dk_soe.get_cvr_or_pension(:assignment_id,:effective_date,''DK_PENSION_PROVIDER_DETAILS''), '''') COL18
,nvl(pay_dk_soe.get_union_membership(:assignment_id,:effective_date), '''') COL19
from per_all_people_f peo
,per_all_assignments_f asg
,hr_all_organization_units_vl org
,per_jobs_vl job
,per_all_positions pos
,hr_locations loc
,per_grades_vl grd
,pay_payrolls_f pay
,pay_people_groups pg
,hr_lookups hl
,(select ppb2.pay_basis_id
,ppb2.business_group_id
,ee.assignment_id
,eev.screen_entry_value salary
from per_pay_bases ppb2
,pay_element_entries_f ee
,pay_element_entry_values_f eev
where ppb2.input_value_id = eev.input_value_id
and ee.element_entry_id = eev.element_entry_id
and :effective_date between ee.effective_start_date
and ee.effective_end_date
and :effective_date between eev.effective_start_date
and eev.effective_end_date
) ppb1
where asg.assignment_id = :assignment_id
and :effective_date
between asg.effective_start_date and asg.effective_end_date
and asg.person_id = peo.person_id
and :effective_date
between peo.effective_start_date and peo.effective_end_date
and asg.position_id = pos.position_id(+)
and asg.job_id = job.job_id(+)
and asg.location_id = loc.location_id(+)
and asg.grade_id = grd.grade_id(+)
and asg.people_group_id = pg.people_group_id(+)
and asg.payroll_id = pay.payroll_id(+)
and :effective_date
between pay.effective_start_date(+) and pay.effective_end_date(+)
and asg.organization_id = org.organization_id
and :effective_date
between org.date_from and nvl(org.date_to, :effective_date)
and asg.pay_basis_id = ppb1.pay_basis_id(+)
and asg.assignment_id = ppb1.assignment_id(+)
and asg.business_group_id = ppb1.business_group_id(+)
and hl.application_id (+) = 800
and hl.lookup_type (+) =''NATIONALITY''
and hl.lookup_code (+) =peo.nationality';
select action_type from
pay_payroll_actions pa
, per_time_periods tp
, pay_assignment_actions aa
where pa.payroll_action_id = aa.payroll_action_id
and pa.effective_date = tp.regular_payment_date
and pa.payroll_id = tp.payroll_id
and aa.assignment_action_id = p_assignment_action_id;
'select tp1.period_name || '' - '' || tp2.period_name COL01
,fnd_date.date_to_displaydate(tp1.end_date) COL04
,fnd_date.date_to_displaydate(pa2.effective_date) COL03
,fnd_date.date_to_displaydate(aa1.start_date) COL05
,fnd_date.date_to_displaydate(aa2.end_date) COL06
,fnd_date.date_to_displaydate(tp1.start_date) COL02
,tp1.period_type COL07
,fnd_date.date_to_displaydate(tp1.DEFAULT_DD_DATE) COL08
from pay_payroll_actions pa1
,pay_payroll_actions pa2
,per_time_periods tp1
,per_time_periods tp2
,pay_assignment_actions aa1
,pay_assignment_actions aa2
where pa1.payroll_action_id = aa1.payroll_action_id
and pa1.effective_date = tp1.regular_payment_date
and pa1.payroll_id = tp1.payroll_id
and aa1.assignment_action_id = :PREPAY_MAX_ACTION
and pa2.payroll_action_id = aa2.payroll_action_id
and pa2.effective_date = tp2.regular_payment_date
and pa2.payroll_id = tp2.payroll_id
and aa2.assignment_action_id = :PREPAY_MIN_ACTION';
'select tp.period_name COL01
,fnd_date.date_to_displaydate(tp.end_date) COL04
,fnd_date.date_to_displaydate(pa.effective_date) COL03
,fnd_date.date_to_displaydate(aa.start_date) COL05
,fnd_date.date_to_displaydate(aa.end_date) COL06
,fnd_date.date_to_displaydate(tp.start_date) COL02
,tp.period_type COL07
,fnd_date.date_to_displaydate(tp.DEFAULT_DD_DATE) COL08
from pay_payroll_actions pa
,per_time_periods tp
,pay_assignment_actions aa
where pa.payroll_action_id = aa.payroll_action_id
and pa.effective_date = tp.regular_payment_date
and pa.payroll_id = tp.payroll_id
and aa.assignment_action_id = :assignment_action_id';
'select tp.period_name COL01
,fnd_date.date_to_displaydate(tp.end_date) COL04
,fnd_date.date_to_displaydate(pa.effective_date) COL03
,fnd_date.date_to_displaydate(aa.start_date) COL05
,fnd_date.date_to_displaydate(aa.end_date) COL06
,fnd_date.date_to_displaydate(tp.start_date) COL02
,tp.period_type COL07
,fnd_date.date_to_displaydate(tp.DEFAULT_DD_DATE) COL08
from pay_payroll_actions pa
,per_time_periods tp
,pay_assignment_actions aa
where pa.payroll_action_id = aa.payroll_action_id
and pa.time_period_id = tp.time_period_id
and aa.assignment_action_id = :assignment_action_id';
'select ORG_PAYMENT_METHOD_NAME COL01
,pt.payment_type_name COL04
,pay_soe_util.getBankDetails('':legislation_code''
,ppm.external_account_id
,''BANK_NAME''
,null) COL02
,pay_soe_util.getBankDetails('':legislation_code''
,ppm.external_account_id
,''BANK_ACCOUNT_NUMBER''
,fnd_profile.value(''HR_MASK_CHARACTERS'')) COL03
,to_char(pp.value,fnd_currency.get_format_mask(:G_CURRENCY_CODE,40)) COL16
,nvl(pay_dk_soe.get_bank_reg_number(ppm.external_account_id), '''') COL05
from pay_pre_payments pp
, pay_personal_payment_methods_f ppm
, pay_org_payment_methods_f opm
, pay_payment_types_tl pt
where pp.assignment_action_id in
(select ai.locking_action_id
from pay_action_interlocks ai
where ai.locked_action_id :action_clause)
and pp.personal_payment_method_id = ppm.personal_payment_method_id(+)
and :effective_date
between ppm.effective_start_date(+) and ppm.effective_end_date(+)
and pp.org_payment_method_id = opm.org_payment_method_id
and :effective_date
between opm.effective_start_date and opm.effective_end_date
and opm.payment_type_id = pt.payment_type_id
and pt.language = userenv(''LANG'')';
select hou.name
from
pay_run_result_values rrv
, pay_input_values_f iv
, hr_organization_units hou
where rrv.run_result_id = p_run_result_id
and rrv.input_value_id = iv.input_value_id
and iv.name = 'Third Party Payee'
and p_effective_date between
iv.effective_start_date and iv.effective_end_date
and hou.organization_id = FND_NUMBER.CANONICAL_TO_NUMBER(rrv.result_value)
and p_effective_date between hou.date_from and nvl(hou.date_to, p_effective_date);
'select /*+ ORDERED */ nvl(ettl.reporting_name,et.element_type_id) COL01
, nvl(ettl.reporting_name,ettl.element_name)||
decode( nvl(ettl.reporting_name,ettl.element_name)
,''Pension'', '' ( ''||pay_dk_soe.get_pp_name(:effective_date,max(rr.run_result_id))||'' )''
,''Employer Pension'', '' ( ''||pay_dk_soe.get_pp_name(:effective_date,max(rr.run_result_id))||'' )''
,''Retro Pension'', '' ( ''||pay_dk_soe.get_pp_name(:effective_date,max(rr.run_result_id))||'' )''
,''Retro Employer Pension'','' ( ''||pay_dk_soe.get_pp_name(:effective_date,max(rr.run_result_id))||'' )'') COL02
, to_char(sum(FND_NUMBER.CANONICAL_TO_NUMBER(rrv.result_value)),fnd_currency.get_format_mask(:G_CURRENCY_CODE,40)) COL16
, decode(count(*),1,''1'',''2'') COL17 -- destination indicator
, decode(count(*),1,max(rr.run_result_id),max(et.element_type_id)) COL18
from pay_assignment_actions aa
, pay_run_results rr
, pay_run_result_values rrv
, pay_input_values_f iv
, pay_input_values_f_tl ivtl
, pay_element_types_f et
, pay_element_types_f_tl ettl
, pay_element_set_members esm
, pay_element_sets es
where aa.assignment_action_id :action_clause
and aa.assignment_action_id = rr.assignment_action_id
and rr.status in (''P'',''PA'')
and rr.run_result_id = rrv.run_result_id
and rr.element_type_id = et.element_type_id
and :effective_date between
et.effective_start_date and et.effective_end_date
and et.element_type_id = ettl.element_type_id
and rrv.input_value_id = iv.input_value_id
and iv.name = ''Pay Value''
and :effective_date between
iv.effective_start_date and iv.effective_end_date
and iv.input_value_id = ivtl.input_value_id
and ettl.language = userenv(''LANG'')
and ivtl.language = userenv(''LANG'')
and et.element_type_id = esm.element_type_id
and esm.element_set_id = es.element_set_id
and ( es.BUSINESS_GROUP_ID IS NULL
OR es.BUSINESS_GROUP_ID = :business_group_id )
AND ( es.LEGISLATION_CODE IS NULL
OR es.LEGISLATION_CODE = '':legislation_code'' )
and es.element_set_name = '''|| p_element_set_name ||'''
group by nvl(ettl.reporting_name,ettl.element_name)
, ettl.reporting_name
,nvl(ettl.reporting_name,et.element_type_id)
/*Changed for Pension provider break up */
, nvl(ettl.reporting_name,ettl.element_name)||
decode( nvl(ettl.reporting_name,ettl.element_name)
,''Pension'', '' ( ''||pay_dk_soe.get_pp_name(:effective_date,rr.run_result_id)||'' )''
,''Employer Pension'', '' ( ''||pay_dk_soe.get_pp_name(:effective_date,rr.run_result_id)||'' )''
,''Retro Pension'', '' ( ''||pay_dk_soe.get_pp_name(:effective_date,rr.run_result_id)||'' )''
,''Retro Employer Pension'','' ( ''||pay_dk_soe.get_pp_name(:effective_date,rr.run_result_id)||'' )'')
order by nvl(ettl.reporting_name,ettl.element_name)';
select pa.payroll_id
, aa.action_sequence
, pa.effective_date
, aa.assignment_id
, pa.business_group_id
, bg.legislation_code
, lrl.rule_mode
from pay_payroll_actions pa
, pay_assignment_actions aa
, per_business_groups bg
, pay_legislation_rules lrl
where aa.assignment_action_id = p_assignment_action_id
and aa.payroll_action_id = pa.payroll_action_id
and pa.business_group_id = bg.business_group_id
and lrl.legislation_code(+) = bg.legislation_code
and lrl.rule_type(+) = 'SAVE_ASG_RUN_BAL';
select db.defined_balance_id
, bd.dimension_name
, bd.period_type
, bt.balance_name
, bt.reporting_name
, nvl(bt.reporting_name,bt.balance_name) defined_balance_name
from
pay_defined_balances db
, pay_balance_dimensions bd
, pay_balance_types_tl bt
where db.balance_dimension_id = bd.balance_dimension_id
and db.balance_type_id = bt.balance_type_id
and bt.language = userenv('LANG')
and bd.legislation_code ='DK'
and bd.database_item_suffix IN ('_PP_ASG_PTD','_PP_ASG_YTD','_PP_PAYMENTS');
select rb.TAX_UNIT_ID
, rb.JURISDICTION_CODE
, rb.SOURCE_ID
, rb.SOURCE_TEXT
, rb.SOURCE_NUMBER
, rb.SOURCE_TEXT2
from pay_run_balances rb
, pay_assignment_actions aa
, pay_payroll_actions pa
where rb.ASSIGNMENT_ID = l_assignment_id
and l_action_sequence >= aa.action_sequence
and rb.assignment_action_id = aa.assignment_action_id
and aa.payroll_action_id = pa.payroll_action_id
and pa.effective_date >= l_earliest_ctx_date;
select distinct
aa.tax_unit_id tax_unit_id
, rr.jurisdiction_code jurisdiction_code
, decode(l_si_needed_chr,
'Y', pay_balance_pkg.find_context('SOURCE_ID'
,rr.run_result_id)
,null) source_id
, decode(l_st_needed_chr,
'Y', pay_balance_pkg.find_context('SOURCE_TEXT'
,rr.run_result_id)
,null) source_text
, decode(l_sn_needed_chr,
'Y', pay_balance_pkg.find_context('SOURCE_NUMBER'
,rr.run_result_id)
,null) source_number
, decode(l_st2_needed_chr,
'Y', pay_balance_pkg.find_context('SOURCE_TEXT2'
,rr.run_result_id)
,null) source_text2
/* Added for display of Pension Provider balances */
, decode(l_org_needed_chr,
'Y', pay_balance_pkg.find_context('ORGANIZATION_ID'
,rr.run_result_id)
,null) organization_id
from pay_assignment_actions aa,
pay_payroll_actions pa,
pay_run_results rr
where aa.ASSIGNMENT_ID = l_assignment_id
and aa.assignment_action_id = rr.assignment_action_id
and l_action_sequence >= aa.action_sequence
and aa.payroll_action_id = pa.payroll_action_id
and pa.effective_date >= l_earliest_ctx_date;
SELECT name
FROM hr_organization_units
WHERE organization_id = p_org_id ;
SELECT '''' || bg.currency_code || '''' currency_code
FROM pay_payroll_actions pa
, pay_assignment_actions aa
, per_business_groups bg
WHERE aa.assignment_action_id = p_assignment_action_id
AND aa.payroll_action_id = pa.payroll_action_id
AND pa.business_group_id = bg.business_group_id
AND rownum = 1;
return ('select null COL01 from dual where 1=0');