Thursday 26 December 2013

Cross Validation Rules Lines

SELECT ffvrv.flex_validation_rule_name rule_name
     , '#### HEADER DETAILS ####' header_details
     , ffvrv.enabled_flag enabled
     , ffvrv.creation_date header_created
     , cr_by.description header_created_by
     , ffvrv.last_update_date header_updated
     , up_by.description header_updated_by
     , ffvrv.error_segment_column_name error_segment_basic
     , DECODE (ffvrv.error_segment_column_name
             , 'SEGMENT1', 'Blah'            
             , 'SEGMENT2', 'Blah Blah'
             , 'SEGMENT4', 'Blah Blah Blah'
             , 'SEGMENT3', 'Blah Blah Blah Blah'
             , NULL)
          error_segment
     , ffvrv.error_message_text error_message
     , ffvrv.description
     , '#### LINE DETAILS ####' line_details
     , ffvrl.creation_date line_created
     , cr_line_by.description line_created_by
     , ffvrl.last_update_date line_updated
     , up_line_by.description line_updated_by
     , ffvrl.enabled_flag line_enabled
     , ffvrl.concatenated_segments_low from_
     , ffvrl.concatenated_segments_high to_
     , DECODE (ffvrl.include_exclude_indicator
             , 'E', 'Exclude'
             , 'I', 'Include')
          include_exclude
  FROM apps.fnd_flex_vdation_rules_vl ffvrv
     , apps.fnd_flex_validation_rule_lines ffvrl
     , applsys.fnd_user cr_by
     , applsys.fnd_user up_by
     , applsys.fnd_user cr_line_by
     , applsys.fnd_user up_line_by
 WHERE ffvrv.flex_validation_rule_name = ffvrl.flex_validation_rule_name
   AND ffvrv.created_by = cr_by.user_id
   AND ffvrv.last_updated_by = up_by.user_id
   AND ffvrl.created_by = cr_line_by.user_id
   AND ffvrl.last_updated_by = up_line_by.user_id
   AND cr_by.user_name NOT IN ('AUTOINSTALL', 'INITIAL SETUP', 'SYSADMIN')
ORDER BY 1,ffvrl.concatenated_segments_low;

No comments:

Post a Comment