Following query will help you to get formula from database , it will help you to search element , balance and some other database items if you need to find in which formula they used ( it cannot be found through application )
Fill ? with your data and enjoy :)
SELECT b.row_id, b.formula_id, b.effective_start_date, b.effective_end_date,
b.business_group_id, b.legislation_code, b.formula_type_id,
b.base_formula_name, b.description base_description, b.formula_name,
b.description, b.formula_text, b.sticky_flag, b.compile_flag,
b.last_update_date, b.last_updated_by, b.last_update_login,
b.created_by, b.creation_date,
NVL (hr_general.decode_lookup ('FORMULA_TYPE', fty.formula_type_name),
fty.formula_type_name
) formula_type,
DECODE (cpi.formula_id, NULL, 'N', 'Y') verified
FROM ff_formulas_f_vl b,
ff_formula_types fty,
ff_compiled_info_f cpi
WHERE fty.formula_type_id = b.formula_type_id
AND cpi.formula_id(+) = b.formula_id
AND cpi.effective_start_date(+) = b.effective_start_date
AND sysdate BETWEEN b.effective_start_date AND b.effective_end_date
AND (business_group_id IS NULL OR business_group_id = ?)
AND (legislation_code IS NULL OR legislation_code = '?')
AND (formula_name LIKE '%?%')
Fill ? with your data and enjoy :)
SELECT b.row_id, b.formula_id, b.effective_start_date, b.effective_end_date,
b.business_group_id, b.legislation_code, b.formula_type_id,
b.base_formula_name, b.description base_description, b.formula_name,
b.description, b.formula_text, b.sticky_flag, b.compile_flag,
b.last_update_date, b.last_updated_by, b.last_update_login,
b.created_by, b.creation_date,
NVL (hr_general.decode_lookup ('FORMULA_TYPE', fty.formula_type_name),
fty.formula_type_name
) formula_type,
DECODE (cpi.formula_id, NULL, 'N', 'Y') verified
FROM ff_formulas_f_vl b,
ff_formula_types fty,
ff_compiled_info_f cpi
WHERE fty.formula_type_id = b.formula_type_id
AND cpi.formula_id(+) = b.formula_id
AND cpi.effective_start_date(+) = b.effective_start_date
AND sysdate BETWEEN b.effective_start_date AND b.effective_end_date
AND (business_group_id IS NULL OR business_group_id = ?)
AND (legislation_code IS NULL OR legislation_code = '?')
AND (formula_name LIKE '%?%')
No comments:
Post a Comment