The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT fnd_number.canonical_to_number(LIM.global_value)
, fnd_number.canonical_to_number(NIR.global_value)
FROM ff_globals_f LIM
, ff_globals_f NIR
WHERE LIM.global_name = 'NI_CAR_MAX_PRICE'
AND csr0_session_date between LIM.effective_start_date and LIM.effective_end_date
AND NIR.global_name = 'NI_CAR_CONTRIB_RATE'
AND csr0_session_date between NIR.effective_start_date and NIR.effective_end_date;
SELECT E_TL.element_name
, IPR.input_value_id
, IRD.input_value_id
, IRN.input_value_id
, IMB.input_value_id
, IFT.input_value_id
, ICC.input_value_id
, IFS.input_value_id
, IAP.input_value_id
FROM pay_input_values_f IPR
, pay_input_values_f IRD
, pay_input_values_f IRN
, pay_input_values_f IMB
, pay_input_values_f IFT
, pay_input_values_f ICC
, pay_input_values_f IFS
, pay_input_values_f IAP
, pay_element_types_f_tl E_TL
, pay_element_types_f E
WHERE E_TL.element_type_id = E.element_type_id
AND E.element_type_id = p_element_type_id
AND userenv('LANG') = E_TL.language
AND IPR.element_type_id = E.element_type_id
AND IPR.name = 'Price'
AND IRD.element_type_id =E.element_type_id
AND IRD.name = 'Registration Date'
AND IRN.element_type_id = E.element_type_id
AND IRN.name = 'Registration Number'
AND IMB.element_type_id = E.element_type_id
AND IMB.name = 'Mileage Band'
AND IFT.element_type_id = E.element_type_id
AND IFT.name = 'Fuel Type'
AND ICC.element_type_id = E.element_type_id
AND ICC.name = 'Engine cc'
AND IFS.element_type_id = E.element_type_id
AND IFS.name = 'Fuel Scale'
AND IAP.element_type_id = E.element_type_id
AND IAP.name = 'Payment'
AND csr0_session_date between E.effective_start_date and E.effective_end_date;
select
max(decode(V.input_value_id,csr2_pr,
fnd_number.canonical_to_number(V.Screen_entry_value),null) ) csr3_price
,max(decode(V.input_value_id, csr2_mb,
fnd_number.canonical_to_number(V.Screen_entry_value),null)) csr3_mileage_band
,max(decode(V.input_value_id,csr2_rd,
fnd_date.canonical_to_date(V.Screen_entry_value),null)) csr3_reg_date
,max(decode(V.input_value_id,csr2_ft,
V.Screen_entry_value,null)) csr3_fuel_type
,max(decode(V.input_value_id,csr2_cc,
nvl(fnd_number.canonical_to_number(v.Screen_entry_value),0),null)) csr3_engine_cc
,max(decode(V.input_value_id,csr2_fs,
fnd_number.canonical_to_number(V.Screen_entry_value),null)) csr3_fuel_scale
,max(decode(V.input_value_id,csr2_ap,
nvl(fnd_number.canonical_to_number(V.Screen_entry_value),0),null)) csr3_payment
,EENT.effective_end_date csr3_end_date
,EENT.effective_start_date csr3_start_date
FROM pay_element_entries_f EENT
, pay_element_links_f LINK
, pay_element_entry_values_f V
WHERE EENT.effective_end_date >= v_tax_year_start
AND EENT.effective_start_date <=
least(p_term_date,p_end_of_period_date,v_tax_year_end)
AND EENT.assignment_id = p_assignment_id
AND LINK.element_type_id = p_element_type_id
AND EENT.element_link_id = LINK.element_link_id
AND EENT.effective_start_date >= LINK.effective_start_date
AND EENT.effective_end_date <= LINK.effective_end_date
AND EENT.entry_type = 'E'
AND V.Element_entry_id = EENT.element_entry_id
AND V.Effective_start_date = EENT.effective_start_date
group by EENT.effective_end_date, EENT.effective_start_date;
SELECT puc.value
FROM pay_user_column_instances_f puc,
pay_user_columns col,
pay_user_rows_f ur,
pay_user_tables tab
WHERE tab.user_table_id = col.user_table_id
AND col.user_column_id = puc.user_column_id
AND puc.user_row_id = ur.user_row_id
AND tab.user_table_name = 'NI_CAR_BENEFIT'
--AGE BAND
AND col.user_column_name =
DECODE(cp_primary_ind,
'P',DECODE(cp_age_factor,
2,'CAR_1_OVER_4','CAR_1_UNDER_4'),
'S',DECODE(cp_age_factor,
2,'CAR_2_OVER_4','CAR_2_UNDER_4'))
--MILEAGE BAND
AND ur.user_row_id = (SELECT ur.user_row_id
FROM pay_user_column_instances_f puc,
pay_user_columns col,
pay_user_tables tab,
pay_user_rows_f ur
WHERE col.user_table_id = tab.user_table_id
AND col.user_column_id = puc.user_column_id
AND ur.user_row_id = puc.user_row_id
AND tab.user_table_name = 'NI_CAR_BENEFIT'
AND col.user_column_name = 'LABEL'
AND cp_mileage_factor = to_number(puc.value)
AND cp_date between
puc.effective_start_date AND puc.effective_end_date
AND cp_date between
ur.effective_start_date AND ur.effective_end_date)
--
AND cp_date BETWEEN
puc.effective_start_date AND puc.effective_end_date
AND cp_date BETWEEN
ur.effective_start_date AND ur.effective_end_date;
SELECT max(decode(I.name,'Payment',
nvl(fnd_number.canonical_to_number(V.screen_entry_value),0),null)) Payment
, max(decode(I.name,'Price',
fnd_number.canonical_to_number(V.screen_entry_value),null)) Price
, EENT.effective_end_date
, EENT.effective_start_date
FROM pay_element_entries_f EENT
, pay_element_links_f LINK
, pay_element_entry_values_f V
, pay_input_values_x I
WHERE EENT.effective_end_date >= f_tax_year_start
AND EENT.effective_start_date <=
least(p_term_date,p_end_of_period_date,f_tax_year_end)
AND EENT.assignment_id = p_assignment_id
AND LINK.element_type_id = p_element_type_id
AND EENT.element_link_id = LINK.element_link_id
AND EENT.effective_start_date >= LINK.effective_start_date
AND EENT.effective_end_date <= LINK.effective_end_date
AND EENT.entry_type = 'E'
AND I.element_type_id = p_element_type_id
+ decode(EENT.element_entry_id,0,0,0)
AND V.element_entry_id = EENT.element_entry_id
AND V.input_value_id = I.input_value_id
+ decode(EENT.element_entry_id,0,0,0)
AND V.effective_start_date = EENT.effective_start_date
AND V.effective_end_date = EENT.effective_end_date
group by EENT.effective_end_date, EENT.effective_start_date;
SELECT effective_date
FROM fnd_sessions
WHERE session_id = userenv('sessionid');