The following lines contain the word 'select', 'insert', 'update' or 'delete':
cheques to be selected
01-FEB-1996 mwcallag 40.6 339128 SQL tuned to improve performance.
05-OCT-1994 RFINE 40.4 Renamed package to pay_chqwrt_pkg
10-DEC-1993 DSAXBY 40.1 G350 Altered incorrect assignment
interlock sql.
Added missing date effective join.
12-OCT-1993 CLEVERLY 1.0 First created.
*/
chq_sql varchar(4000); -- select list for pre-payments..
NB If you alter or add select statements check that they
do not contain more than 4000 characters
*/
procedure chqsql
(
procname in varchar2, /* name of the select statement to use */
sqlstr in out nocopy varchar2, /* string holding the sql statement */
len out nocopy number /* length of the sql string */
) is
begin
-- go through each of the sql sub strings and see if
-- they are needed.
if procname = 'DEFAULT' then
sqlstr := chq_sql;
Returns the cheque date based on the select payment
NOTES
*/
/*
function cheque_date
(
p_business_group_id in number,
p_payroll_id in number,
p_consolidation_set_id in number,
p_start_date in date,
p_end_date in date,
p_payment_type_id in number,
p_payment_method_id in number,
p_cheque_style in varchar2
) return date is
--
l_cheque_date date;
select legislation_code
into l_leg_code
from per_business_groups_perf
where business_group_id = p_business_group_id;
select paa.rowid
from
(select /*+ ORDERED */paa1.assignment_action_id,
hou.name,
ppf.last_name,
ppf.first_name
from pay_payroll_actions ppa1,
pay_assignment_actions paa1,
per_assignments_f paf,
hr_organization_units hou,
per_people_f ppf
where paa1.object_type is null
and paa1.payroll_action_id = ppa1.payroll_action_id
and paa1.payroll_action_id = :pactid
and paa1.assignment_id = paf.assignment_id
and ppa1.effective_date between
paf.effective_start_date and paf.effective_end_date
and paf.person_id = ppf.person_id
and ppa1.effective_date between
ppf.effective_start_date and ppf.effective_end_date
and paf.organization_id = hou.organization_id
union all
select paa1.assignment_action_id,
hou.name,
null,
null
from hr_organization_units hou,
pay_assignment_actions paa1
where paa1.object_type = ''HOU''
and paa1.object_id = hou.organization_id
and paa1.payroll_action_id = :pactid
) un,
pay_assignment_actions paa
where paa.payroll_action_id = :pactid
and paa.assignment_action_id = un.assignment_action_id
order by un.name,un.last_name,un.first_name
for update of paa.assignment_id';