Tuesday, 25 June 2013

Query to find users who have a responsibility

/* Formatted on 6/25/2013 5:01:44 PM (QP5 v5.114.809.3010) */
SELECT   usr.user_id,
         usr.user_name,
         res.RESPONSIBILITY_ID,
         res.RESPONSIBILITY_NAME
  FROM   apps.FND_USER usr,
         apps.FND_RESPONSIBILITY_TL res,
         apps.FND_USER_RESP_GROUPS grp
 WHERE   UPPER (res.RESPONSIBILITY_NAME) LIKE
            UPPER ('%' || NVL ('&EnterRespName', 'INV') || '%')
         AND UPPER (res.RESPONSIBILITY_NAME) NOT LIKE '%AX%'
         AND UPPER (res.RESPONSIBILITY_NAME) NOT LIKE '%OPM%'
         AND grp.responsibility_id = res.responsibility_id
         AND grp.user_id = usr.user_id;

No comments:

Post a Comment