Friday, 18 July 2014

How to Audit Changes in Profile Options Query

/* Formatted on 7/18/2014 9:35:39 AM (QP5 v5.115.810.9015) */
SELECT    '$$$$ Profile Option Name $$$$'
       || a.user_profile_option_name
       || '*** Was Updated with value '
       || '"'
       || b.profile_option_value
       || '"'
       || ' In The Last '
       || &p_no_of_days
       || ' days'
       || ' by '
       || (SELECT user_name
           FROM apps.fnd_user u
           WHERE u.user_id = b.last_updated_by)
          mesg
FROM apps.fnd_profile_options_vl a,
     apps.fnd_profile_option_values b,
     apps.fnd_user c
WHERE a.profile_option_id = b.profile_option_id
      AND b.last_updated_by = c.user_id
      AND (b.last_update_date > SYSDATE - :p_no_of_days
           OR b.creation_date > SYSDATE - :p_no_of_days)

No comments:

Post a Comment