Thursday, 18 April 2013

Oracle Flex Fields value query

 Value Set Usage by KeyFlexfields

/* Formatted on 4/18/2013 3:43:49 PM (QP5 v5.114.809.3010) */
  SELECT   flex_value_set_name "Value Set",
           descriptive_flexfield_name "Flexfield",
           descriptive_flex_context_code "Structure",
           end_user_column_name "Column"
    FROM   apps.fnd_descr_flex_column_usages a, apps.fnd_flex_value_sets b
   WHERE   a.flex_value_set_id = b.flex_value_set_id
           AND descriptive_flexfield_name NOT LIKE '$SRS$%'
ORDER BY   flex_value_set_name,
           descriptive_flexfield_name,
           descriptive_flex_context_code;
          
          
Value Set Usage by DescriptiveFlexfields
     
/* Formatted on 4/18/2013 3:45:50 PM (QP5 v5.114.809.3010) */
  SELECT   d.flex_value_set_name "Value Set",
           a.id_flex_name "Flexfield",
           e.id_flex_structure_name "Structure",
           c.segment_name "Segment"
    FROM   apps.fnd_id_flexs a,
           apps.fnd_id_flex_structures b,
           apps.fnd_id_flex_segments c,
           apps.fnd_flex_value_sets d,
           apps.fnd_id_flex_structures_tl e
   WHERE       a.application_id = b.application_id
           AND a.id_flex_code = b.id_flex_code
           AND b.application_id = c.application_id
           AND b.id_flex_code = c.id_flex_code
           AND b.id_flex_num = c.id_flex_num
           AND c.flex_value_set_id = d.flex_value_set_id
           AND c.application_id = e.application_id
           AND c.id_flex_code = e.id_flex_code
ORDER BY   d.flex_value_set_name, a.id_flex_name, e.id_flex_structure_name;

No comments:

Post a Comment