The following lines contain the word 'select', 'insert', 'update' or 'delete':
select lup1.lookup_code
,lup1.meaning
from fnd_lookup_values lup1
where lup1.lookup_type = p_fr_lookup_type
and NOT exists (select lup2.lookup_code
from hr_leg_lookups lup2
where lup2.lookup_type = p_core_lookup_type
and lup2.lookup_code = lup1.lookup_code
and lup2.enabled_flag = lup1.enabled_flag
and nvl(lup2.start_date_active,to_date('01010001','DDMMYYYY')) <= nvl(lup1.start_date_active,to_date('01010001','DDMMYYYY'))
and nvl(lup2.end_date_active,to_date('31124712','DDMMYYYY')) >= nvl(lup1.end_date_active,to_date('01010001','DDMMYYYY'))
);
SELECT g.descriptive_flex_context_code,
g.end_user_column_name
FROM fnd_descr_flex_column_usages g, fnd_columns c
WHERE g.application_id = p_application_id
AND g.required_flag = 'Y'
AND g.descriptive_flexfield_name = p_df
AND g.enabled_flag = 'Y'
AND c.application_id = p_application_id
AND c.table_id = p_table_id
AND c.column_name = g.application_column_name
ORDER BY g.descriptive_flex_context_code;
SELECT t.table_id,
df.application_id,
df.context_required_flag,
df.table_application_id,
df.concatenated_segment_delimiter,
df.description,
df.form_context_prompt
FROM fnd_tables t, fnd_descriptive_flexs_vl df, fnd_application a
WHERE a.application_short_name = 'PER'
AND df.application_id = a.application_id
AND df.descriptive_flexfield_name = p_df
AND t.application_id = df.table_application_id
AND t.table_name = df.application_table_name;
* upgrade depending on which upgrade the user selected *
* retcode = 0 for Status Normal *
* retcode = 1 for Status Warning *
* retcode = 2 for Status Error *
*****************************************************************************/
Procedure run_upgrade(errbuf OUT NOCOPY VARCHAR2
,retcode OUT NOCOPY NUMBER
,p_business_group_id IN NUMBER
,p_upgrade_type IN VARCHAR2)
IS
l_status number :=0; /* Zero means upgrade OK. 1 means error */