The following lines contain the word 'select', 'insert', 'update' or 'delete':
select ctx.descriptive_flex_context_code context_code,
substr(seg.application_column_name,
length('INTERFACE_LINE_ATTRIBUTE')+1) segment_num
from fnd_descr_flex_contexts ctx,
fnd_descr_flex_column_usages seg
where ctx.application_id = pc_appl_id
and ctx.descriptive_flexfield_name = pc_desc_flex
and ctx.application_id = seg.application_id(+)
and ctx.descriptive_flexfield_name =
seg.descriptive_flexfield_name(+)
and ctx.descriptive_flex_context_code =
seg.descriptive_flex_context_code(+)
and seg.enabled_flag (+) = 'Y'
order by ctx.descriptive_flex_context_code, seg.column_seq_num;
THEN l_stmt := 'SELECT 0, 0 FROM '|| p_table_name;
ELSE l_stmt := 'SELECT CUSTOMER_TRX_ID, CUSTOMER_TRX_LINE_ID FROM '||
p_table_name;