https://dbissues.blogspot.com/2017/12/activeinactive-and-locked-users-from.html
SELECT 'Active' STATUS, valid.*
FROM fnd_user valid
WHERE valid.user_id IN (SELECT user_id
FROM fnd_user
WHERE NVL (end_date, SYSDATE) >= SYSDATE)
and valid.encrypted_user_password <> 'INVALID'
UNION ALL
SELECT 'In Active' STATUS, invalid.*
FROM fnd_user invalid
WHERE invalid.user_id IN (SELECT user_id
FROM fnd_user
WHERE NVL (end_date, SYSDATE) < SYSDATE)
and invalid.encrypted_user_password <> 'INVALID'
UNION ALL
SELECT 'Locked' STATUS, Locked.*
FROM fnd_user Locked
WHERE Locked.encrypted_user_password = 'INVALID'
ORDER BY 2;
No comments:
Post a Comment