The following lines contain the word 'select', 'insert', 'update' or 'delete':
select day into i_date
from qpr_time_allhier_v
where month = p_time_pk
and rownum<2;
select day into i_date
from qpr_time_allhier_v
where fiscal_month = p_time_pk
and rownum<2;
select day into i_date
from qpr_time_allhier_v
where quarter = p_time_pk
and rownum<2;
select day into i_date
from qpr_time_allhier_v
where fiscal_quarter = p_time_pk
and rownum<2;
select day into i_date
from qpr_time_allhier_v
where year = p_time_pk
and rownum<2;
select day into i_date
from qpr_time_allhier_v
where fiscal_year = p_time_pk
and rownum<2;
procedure insert_lob_values (p_dim_code varchar2,
p_hierarchy_code varchar2,
p_level_code varchar2,
p_level_seq_num number,
p_scope_value varchar2) is
cursor c_level_values is
select level1_value from qpr_dimension_values
where dim_code = p_dim_code
and hierarchy_code = p_hierarchy_code
and instance_id = g_instance
and (decode(p_level_seq_num, 1, level1_value,
2, level2_value,
3, level3_value,
4, level4_value,
5, level5_value,null)=p_scope_value);
level_value_rec.delete;
INSERT INTO qpr_plan_measures
(PRICE_PLAN_DATA_ID,
PRICE_PLAN_ID,
PRICE_PLAN_MEAS_GRP_ID,
PRICE_PLAN_MEAS_GRP_NAME,
run_number,
attribute_1,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN,
REQUEST_ID) values
(qpr_plan_measures_s.nextval,
g_price_plan_id,
decode(p_dim_code,
'ORD', 1,
'PRD', 2,
'GEO', 3,
'CUS', 4,
'ORG', 5,
'REP', 6,
'CHN', 7,
'PSG', 8,
'ADJ', 0),
p_level_code,
g_run_number,
level_value_rec(I)
,SYSDATE
,FND_GLOBAL.USER_ID
,SYSDATE
,FND_GLOBAL.USER_ID
,FND_GLOBAL.CONC_LOGIN_ID
,FND_GLOBAL.conc_request_id);
select a.level_id level_id, a.operator operator,
a.scope_value scope_value, b.level_ppa_code level_ppa_code,
b.level_seq_num level_seq_num, c.hierarchy_ppa_code hierarchy_ppa_code,
c.dim_code dim_code
from qpr_scopes a, qpr_hier_levels b, qpr_hierarchies_v c
where b.price_plan_id= qpr_sr_util.g_datamart_tmpl_id
and b.hierarchy_level_id=a.level_id
and b.hierarchy_id = c.hierarchy_id
and a.parent_entity_type = 'DATAMART'
and a.parent_id = p_price_plan_id;
select hsecs into l_start_time from v$timer;
select instance_id,
base_uom_code, currency_code,
start_date, end_date
into p_sr_instance_id, g_base_uom,
g_currency_code,
l_start_date, l_end_date
from qpr_price_plans_b
where price_plan_id=p_price_plan_id
and aw_created_flag = 'Y';
select calendar_code into g_calendar_code
from qpr_hierarchies_v
where price_plan_id=p_price_plan_id
--and dim_code = 'TIM'
and rownum<2
and hierarchy_ppa_code='FISCAL';
select 1
into l_dummy
from qpr_measure_data
where instance_id = g_instance
and measure_type_code = 'SALESDATA'
and time_level_value between g_start_date and
nvl(g_end_date, time_level_value)
and rownum<2;
insert_lob_values(c_scope_lines_rec.dim_code,
c_scope_lines_rec.hierarchy_ppa_code,
c_scope_lines_rec.level_ppa_code,
c_scope_lines_rec.level_seq_num,
c_scope_lines_rec.scope_value);
select hsecs into l_start_time from v$timer;
select hsecs into l_end_time from v$timer;
delete qpr_plan_measures
where run_number=g_run_number;
update qpr_price_plans_b
set aw_status_code = 'PROCESS'
where price_plan_id=p_price_plan_id;
select dim_code
from qpr_dimensions
where price_plan_id = p_plan_id;
select a.cube_code cube_code,
b.measure_ppa_code measure_ppa_code,
c.measure_id measure_id
from qpr_cubes a, qpr_measures b, qpr_measures c
where a.cube_id=b.cube_id and
b.price_plan_id=p_plan_id
and b.measure_ppa_code = c.measure_ppa_code
and c.price_plan_id = qpr_sr_util.g_datamart_tmpl_id
and b.meas_type='INPUT'
order by a.cube_id, c.measure_id;
select xml_message
from olapsys.xml_load_log
where xml_loadid = (select max(xml_loadid) from olapsys.xml_load_log )
order by xml_date ;
select aw_code into l_aw_name
from qpr_price_plans_b
where price_plan_id= p_plan_id;
select count(*) into measure_count
from qpr_cubes a, qpr_measures b
where a.cube_id=b.cube_id and
b.price_plan_id=p_plan_id
and b.meas_type='INPUT';