The following lines contain the word 'select', 'insert', 'update' or 'delete':
select min(start_date)
into l_date
from fii_time_ent_year;
select max(end_date)
into l_date
from fii_time_ent_year;
select l_as_of_date-start_date, sequence
into l_timespan, l_curr_year
from fii_time_ent_year
where l_as_of_date between start_date and end_date;
select start_date+l_timespan
into l_date
from fii_time_ent_year
where sequence=l_curr_year-1;
select end_date-l_as_of_date, sequence
into l_timespan, l_curr_year
from fii_time_ent_year
where l_as_of_date between start_date and end_date;
select greatest(start_date, end_date-l_timespan)
into l_date
from fii_time_ent_year
where sequence=l_curr_year-1;
select l_as_of_date-start_date, sequence, ent_year_id
into l_timespan, l_curr_qtr, l_curr_year
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date;
select least(end_date, start_date+l_timespan)
into l_date
from fii_time_ent_qtr
where sequence=l_curr_qtr
and ent_year_id=l_curr_year-1;
select end_date-l_as_of_date, sequence, ent_year_id
into l_timespan, l_curr_qtr, l_curr_year
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date;
select greatest(start_date, end_date-l_timespan)
into l_date
from fii_time_ent_qtr
where sequence=l_curr_qtr
and ent_year_id=l_curr_year-1;
select l_as_of_date-start_date, sequence, ent_year_id
into l_timespan, l_curr_qtr, l_curr_year
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date;
select least(end_date, start_date+l_timespan)
into l_date
from fii_time_ent_qtr
where sequence=4
and ent_year_id=l_curr_year-1;
select least(end_date, start_date+l_timespan)
into l_date
from fii_time_ent_qtr
where sequence=l_curr_qtr-1
and ent_year_id=l_curr_year;
select end_date-l_as_of_date, sequence, ent_year_id
into l_timespan, l_curr_qtr, l_curr_year
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date;
select greatest(start_date, end_date-l_timespan)
into l_date
from fii_time_ent_qtr
where sequence=4
and ent_year_id=l_curr_year-1;
select greatest(start_date, end_date-l_timespan)
into l_date
from fii_time_ent_qtr
where sequence=l_curr_qtr-1
and ent_year_id=l_curr_year;
select l_as_of_date-p.start_date, p.sequence, p.ent_year_id
into l_timespan, l_curr_period, l_curr_year
from fii_time_ent_period p
where l_as_of_date between p.start_date and p.end_date;
select least(p.end_date, p.start_date+l_timespan)
into l_date
from fii_time_ent_period p
where p.sequence=l_curr_period
and p.ent_year_id=l_curr_year-1;
select p.end_date-l_as_of_date, p.sequence, p.ent_year_id
into l_timespan, l_curr_period, l_curr_year
from fii_time_ent_period p
where l_as_of_date between p.start_date and p.end_date;
select greatest(p.start_date, p.end_date-l_timespan)
into l_date
from fii_time_ent_period p
where p.sequence=l_curr_period
and p.ent_year_id=l_curr_year-1;
select l_as_of_date-p.start_date, p.sequence, p.ent_year_id
into l_timespan, l_curr_period, l_curr_year
from fii_time_ent_period p
where l_as_of_date between p.start_date and p.end_date;
select max(sequence) into l_max_sequence
from fii_time_ent_period
where ent_year_id = l_curr_year-1;
select least(p.end_date, p.start_date+l_timespan)
into l_date
from fii_time_ent_period p
where p.sequence=l_max_sequence
and p.ent_year_id=l_curr_year-1;
select least(p.end_date, p.start_date+l_timespan)
into l_date
from fii_time_ent_period p
where p.sequence=l_curr_period-1
and p.ent_year_id=l_curr_year;
select p.end_date-l_as_of_date, p.sequence, p.ent_year_id
into l_timespan, l_curr_period, l_curr_year
from fii_time_ent_period p
where l_as_of_date between p.start_date and p.end_date;
select max(sequence) into l_max_sequence
from fii_time_ent_period
where ent_year_id = l_curr_year-1;
select greatest(p.start_date, p.end_date-l_timespan)
into l_date
from fii_time_ent_period p
where p.sequence=l_max_sequence
and p.ent_year_id=l_curr_year-1;
select greatest(p.start_date, p.end_date-l_timespan)
into l_date
from fii_time_ent_period p
where p.sequence=l_curr_period-1
and p.ent_year_id=l_curr_year;
select l_as_of_date-w.start_date, w.sequence, p.year445_id
into l_timespan, l_curr_week, l_curr_year
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and l_as_of_date between w.start_date and w.end_date;
select max(w.sequence)
into l_max_sequence
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and l_as_of_date between w.start_date and w.end_date;
select w.start_date+l_timespan
into l_date
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and w.sequence=l_curr_week
and p.year445_id=l_curr_year-1;
select w.start_date+l_timespan
into l_date
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and w.sequence=l_curr_week - 1
and p.year445_id=l_curr_year-1;
select w.start_date+l_timespan
into l_date
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and w.sequence=l_curr_week
and p.year445_id=l_curr_year-1;
select l_as_of_date-w.start_date, w.sequence, p.year445_id
into l_timespan, l_curr_week, l_curr_year
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and l_as_of_date between w.start_date and w.end_date;
select max(w.sequence)+1
into l_curr_week
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and p.year445_id=l_curr_year-1;
select w.start_date+l_timespan
into l_date
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and w.sequence=l_curr_week-1
and p.year445_id=l_curr_year;
select start_date
into l_date
from fii_time_ent_year
where l_as_of_date between start_date and end_date;
select end_date
into l_date
from fii_time_ent_year
where l_as_of_date between start_date and end_date;
select start_date
into l_date
from fii_time_ent_year
where sequence =
(select sequence -1
from fii_time_ent_year
where l_as_of_date between start_date and end_date);
select end_date
into l_date
from fii_time_ent_year
where sequence =
(select sequence -1
from fii_time_ent_year
where l_as_of_date between start_date and end_date);
select start_date
into l_date
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date;
select end_date
into l_date
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date;
select sequence, ent_year_id
into l_curr_qtr, l_curr_year
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date;
select start_date
into l_date
from fii_time_ent_qtr
where sequence=l_curr_qtr
and ent_year_id=l_curr_year-1;
select sequence, ent_year_id
into l_curr_qtr, l_curr_year
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date;
select end_date
into l_date
from fii_time_ent_qtr
where sequence=l_curr_qtr
and ent_year_id=l_curr_year-1;
select sequence, ent_year_id
into l_curr_qtr, l_curr_year
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date;
select start_date
into l_date
from fii_time_ent_qtr
where sequence=4
and ent_year_id=l_curr_year-1;
select start_date
into l_date
from fii_time_ent_qtr
where sequence=l_curr_qtr-1
and ent_year_id=l_curr_year;
select sequence, ent_year_id
into l_curr_qtr, l_curr_year
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date;
select end_date
into l_date
from fii_time_ent_qtr
where sequence=4
and ent_year_id=l_curr_year-1;
select end_date
into l_date
from fii_time_ent_qtr
where sequence=l_curr_qtr-1
and ent_year_id=l_curr_year;
select start_date
into l_date
from fii_time_ent_period
where l_as_of_date between start_date and end_date;
select end_date
into l_date
from fii_time_ent_period
where l_as_of_date between start_date and end_date;
select p.sequence, p.ent_year_id
into l_curr_period, l_curr_year
from fii_time_ent_period p
where l_as_of_date between p.start_date and p.end_date;
select p.start_date
into l_date
from fii_time_ent_period p
where p.sequence=l_curr_period
and p.ent_year_id=l_curr_year-1;
select p.sequence, p.ent_year_id
into l_curr_period, l_curr_year
from fii_time_ent_period p
where l_as_of_date between p.start_date and p.end_date;
select p.end_date
into l_date
from fii_time_ent_period p
where p.sequence=l_curr_period
and p.ent_year_id=l_curr_year-1;
select p.sequence, p.ent_year_id
into l_curr_period, l_curr_year
from fii_time_ent_period p
where l_as_of_date between p.start_date and p.end_date;
select max(sequence) into l_max_sequence
from fii_time_ent_period
where ent_year_id = l_curr_year-1;
select p.start_date
into l_date
from fii_time_ent_period p
where p.sequence=l_max_sequence
and p.ent_year_id=l_curr_year-1;
select p.start_date
into l_date
from fii_time_ent_period p
where p.sequence=l_curr_period-1
and p.ent_year_id=l_curr_year;
select p.sequence, p.ent_year_id
into l_curr_period, l_curr_year
from fii_time_ent_period p
where l_as_of_date between p.start_date and p.end_date;
select max(sequence) into l_max_sequence
from fii_time_ent_period
where ent_year_id = l_curr_year-1;
select p.end_date
into l_date
from fii_time_ent_period p
where p.sequence=l_max_sequence
and p.ent_year_id=l_curr_year-1;
select p.end_date
into l_date
from fii_time_ent_period p
where p.sequence=l_curr_period-1
and p.ent_year_id=l_curr_year;
select start_date
into l_date
from fii_time_week
where l_as_of_date between start_date and end_date;
select end_date
into l_date
from fii_time_week
where l_as_of_date between start_date and end_date;
select w.sequence, p.year445_id
into l_curr_week, l_curr_year
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and l_as_of_date between w.start_date and w.end_date;
select w.start_date
into l_date
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and w.sequence=l_curr_week
and p.year445_id=l_curr_year-1;
select w.sequence, p.year445_id
into l_curr_week, l_curr_year
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and l_as_of_date between w.start_date and w.end_date;
select w.end_date
into l_date
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and w.sequence=l_curr_week
and p.year445_id=l_curr_year-1;
select w.sequence, p.year445_id
into l_curr_week, l_curr_year
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and l_as_of_date between w.start_date and w.end_date;
select max(w.sequence)+1
into l_curr_week
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and p.year445_id=l_curr_year-1;
select w.start_date
into l_date
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and w.sequence=l_curr_week-1
and p.year445_id=l_curr_year;
select w.sequence, p.year445_id
into l_curr_week, l_curr_year
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and l_as_of_date between w.start_date and w.end_date;
select max(w.sequence)+1
into l_curr_week
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and p.year445_id=l_curr_year-1;
select w.end_date
into l_date
from fii_time_week w, fii_time_p445 p
where w.period445_id=p.period445_id
and w.sequence=l_curr_week-1
and p.year445_id=l_curr_year;
select l_as_of_date - 29
into l_date
from dual;
select l_as_of_date - 89
into l_date
from dual;
select l_as_of_date - 364
into l_date
from dual;
select l_as_of_date-6
into l_date
from dual;
select to_char(ent_cqtr_end(l_as_of_date)-l_as_of_date)
into l_day_left
from dual;
select sequence
into l_qtr
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date;
select to_char(to_date(ent_year_id,'yyyy'),'yy')
into l_yr
from fii_time_ent_year
where l_as_of_date between start_date and end_date;
select sequence, ent_year_id
into l_curr_period, l_curr_year
from fii_time_ent_period
where ent_period_id=id;
select ent_period_id
into l_id
from fii_time_ent_period
where sequence=l_curr_period
and ent_year_id=l_curr_year-1;
select count(*) into l_count
from fii_time_day
where report_date = trunc(l_day);
select count(*) into l_count
from fii_time_day
where report_date = trunc(l_day);
select end_date-l_as_of_date, sequence
into l_timespan, l_curr_year
from fii_time_cal_year
where l_as_of_date between start_date and end_date
and calendar_id=p_calendar_id;
select end_date-l_timespan
into l_date
from fii_time_cal_year
where sequence=l_curr_year-1
and calendar_id=p_calendar_id;
select end_date-l_as_of_date, sequence, cal_year_id
into l_timespan, l_curr_qtr, l_curr_year
from fii_time_cal_qtr
where l_as_of_date between start_date and end_date
and calendar_id=p_calendar_id;
select greatest(start_date, end_date-l_timespan)
into l_date
from fii_time_cal_qtr
where sequence=l_curr_qtr
and cal_year_id=l_curr_year-1
and calendar_id=p_calendar_id;
select p.end_date-l_as_of_date, p.sequence, q.cal_year_id
into l_timespan, l_curr_period, l_curr_year
from fii_time_cal_period p, fii_time_cal_qtr q
where p.cal_qtr_id=q.cal_qtr_id
and q.calendar_id=p_calendar_id
and p.calendar_id=q.calendar_id
and l_as_of_date between p.start_date and p.end_date;
select greatest(p.start_date, p.end_date-l_timespan)
into l_date
from fii_time_cal_period p, fii_time_cal_qtr q
where p.cal_qtr_id=q.cal_qtr_id
and q.calendar_id=p_calendar_id
and p.calendar_id=q.calendar_id
and p.sequence=l_curr_period
and q.cal_year_id=l_curr_year-1;
select end_date-l_as_of_date, sequence, cal_year_id
into l_timespan, l_curr_qtr, l_curr_year
from fii_time_cal_qtr
where l_as_of_date between start_date and end_date
and calendar_id=p_calendar_id;
select end_date-l_timespan
into l_date
from fii_time_cal_qtr
where sequence=4
and calendar_id=p_calendar_id
and cal_year_id=l_curr_year-1;
select end_date-l_timespan
into l_date
from fii_time_cal_qtr
where sequence=l_curr_qtr-1
and calendar_id=p_calendar_id
and cal_year_id=l_curr_year;
select p.end_date-l_as_of_date, p.sequence -1 , q.cal_year_id
into l_timespan, l_curr_period, l_curr_year
from fii_time_cal_period p, fii_time_cal_qtr q
where p.cal_qtr_id=q.cal_qtr_id
and q.calendar_id=p_calendar_id
and p.calendar_id=q.calendar_id
and l_as_of_date between p.start_date and p.end_date;
select count(cal_period_id)
into l_curr_period
from fii_time_cal_period p, fii_time_cal_qtr q
where p.cal_qtr_id=q.cal_qtr_id
and q.calendar_id=p_calendar_id
and p.calendar_id=q.calendar_id
and q.cal_year_id=l_curr_year;
select p.end_date-l_timespan
into l_date
from fii_time_cal_period p, fii_time_cal_qtr q
where p.cal_qtr_id=q.cal_qtr_id
and p.sequence=l_curr_period
and q.calendar_id=p_calendar_id
and p.calendar_id=q.calendar_id
and q.cal_year_id=l_curr_year;
select sequence
into l_curr_year
from fii_time_ent_year
where l_as_of_date between start_date and end_date;
select min(start_date)
into l_date
from fii_time_ent_year
where sequence>=l_curr_year-3;
select min(start_date)
into l_date
from
(select *
from fii_time_ent_qtr
where start_date <= l_as_of_date
order by start_date desc)
where rownum < 5;
select min(start_date)
into l_date
from
(select *
from fii_time_ent_period
where start_date <= l_as_of_date
order by start_date desc)
where rownum < 14;
select start_date-7*12
into l_date
from fii_time_week
where l_as_of_date between start_date and end_date;
select end_date
into l_date
from fii_time_ent_year
where sequence =
(select sequence + 1
from fii_time_ent_year
where l_as_of_date between start_date and end_date);
select end_date
into l_date
from fii_time_ent_qtr next,
(select sequence, ent_year_id
from fii_time_ent_qtr
where l_as_of_date between start_date and end_date) curr
where next.sequence = decode(curr.sequence, 4, 1, curr.sequence + 1)
and next.ent_year_id = decode(curr.sequence, 4, curr.ent_year_id+1, curr.ent_year_id);
select max(sequence) into l_max_sequence
from fii_time_ent_period
where ent_year_id = (select ent_year_id
from fii_time_ent_period
where l_as_of_date between start_date and end_date);
select end_date
into l_date
from fii_time_ent_period next,
(select sequence, ent_year_id
from fii_time_ent_period
where l_as_of_date between start_date and end_date) curr
where next.sequence = decode(curr.sequence, l_max_sequence, 1, curr.sequence + 1)
and next.ent_year_id = decode(curr.sequence, l_max_sequence, curr.ent_year_id+1, curr.ent_year_id);
select end_date+7
into l_date
from fii_time_week
where l_as_of_date between start_date and end_date;