The following lines contain the word 'select', 'insert', 'update' or 'delete':
Select to_char(Period_Num) , /* to_char(Start_Date, 'YYYY') Bug fix 1901631 */
substr(period_name, instr(period_name, ' ', 1, 1) + 1, 4)
into v_period_num, v_start_date
from PER_TIME_PERIODS
where Start_Date = st_Date
and Payroll_ID = v_Payroll_ID;
Select a.time_period_id, a.start_date
from PER_TIME_PERIODS a
where a.payroll_id = p_payroll_id
and (a.start_date >= st_date and a.end_date <= en_date)
order by a.start_date;
Select count(*)
into n_Start_Date_Match
from PER_TIME_PERIODS a
where a.START_DATE = st_date
and a.payroll_id = p_payroll_id;
Select count(*)
into n_End_Date_Match
from PER_TIME_PERIODS a
where a.END_DATE = en_date
and a.payroll_id = p_payroll_id;
Select a.START_DATE
into n_First_Date
from PER_TIME_PERIODS a
where a.PAYROLL_ID = p_payroll_id
and a.TIME_PERIOD_ID = C1_Row.Time_Period_ID - 1;
Select a.START_DATE
into n_Last_Date
from PER_TIME_PERIODS a
where a.PAYROLL_ID = p_payroll_id
and a.TIME_PERIOD_ID = C1_Row.Time_Period_ID + 1;
Select a.START_DATE
into n_First_Date
from PER_TIME_PERIODS a
where a.PAYROLL_ID = p_payroll_id
and st_date between a.START_DATE and a.END_DATE;
Select a.START_DATE
into n_Last_Date
from PER_TIME_PERIODS a
where a.PAYROLL_ID = p_payroll_id
and en_date between a.START_DATE and a.END_DATE
and a.START_DATE <> n_First_Date;
Select END_DATE
into ret_Val
from PER_TIME_PERIODS
where PAYROLL_ID = v_Payroll_ID
and START_DATE = st_date;
select sum(PERIOD_SCHEDULE_PERCENT)
into total
from psp_matrix_driver3
where period = st_date;
dat.DELETE;
SELECT schedule_line_id l_id,
schedule_begin_date sbd,
schedule_end_date sed,
schedule_percent sp
FROM psp_schedule_lines
WHERE schedule_hierarchy_id = s_id;
insert into psp_matrix_driver3(SCHEDULE_LINE_ID,
PERIOD,
PERIOD_SCHEDULE_PERCENT) values
(sch_rec.l_id,
dat(i),
per);