Friday, May 6, 2016

SQL - Find All DFFs

select df.application_table_name,
    dft.title
    ,dft.last_update_date dff_update
    --,df.last_update_date 
    ,df.descriptive_flexfield_name
    ,dfc.descriptive_flex_context_code
    ,dfc.last_update_date context_update
    ,dfcu.end_user_column_name
    ,dfcu.last_update_date column_update
    ,dfcut.form_above_prompt
from fnd_descriptive_flexs df
    ,fnd_descriptive_flexs_tl dft
    ,fnd_descr_flex_contexts dfc
    ,fnd_descr_flex_column_usages dfcu
    ,fnd_descr_flex_col_usage_tl dfcut
where 1=1
  --and df.application_table_name like 'OE_ORDER_LIN%'
  and dft.title = 'Items'
  --and df.descriptive_flexfield_name like 'CST_ITEM_COST_DE%'
  and dft.descriptive_flexfield_name = df.descriptive_flexfield_name
  and dft.application_id = df.application_id
  and dfc.descriptive_flexfield_name = df.descriptive_flexfield_name
  and dfcu.descriptive_flexfield_name (+) = dfc.descriptive_flexfield_name
  and dfcu.descriptive_flex_context_code (+) = dfc.descriptive_flex_context_code
  and dfcut.descriptive_flexfield_name (+) = dfcu.descriptive_flexfield_name
  and dfcut.descriptive_flex_context_code (+) = dfcu.descriptive_flex_context_code
  and dfcut.application_column_name (+) = dfcu.application_column_name

order by   dft.title, dfc.descriptive_flex_context_code, dfcu.column_seq_num

No comments: