Query to Join on the same table

Below query helps us in getting User login and Manager login in single query
Basically in OIM USR table we have user user key, user login and manager key fields, so if we want User login and Manager login in the single query we can use below query.


select u.USR_KEY,u.USR_LOGIN,u.USR_DISPLAY_NAME,
u1.USR_KEY as "Manager USR_KEY",u1.USR_LOGIN as "Manager Login",u1.USR_DISPLAY_NAME as "Manager DisplayName"
from usr u
join usr u1 on u1.USR_KEY = u.USR_MANAGER_KEY
--where u.usr_login ='User login  Id';

Comments

Popular posts from this blog

Rules in Sailpoint

Sailpoint Installation Steps (IdentityIQ 7.3 Installation in Windows Machine)

How to develop a Scheduler in OIM