Solved

What DB table or view will hold the data for Activated and Terminated employees, and what Company or Site is the Active or Terminated employee has defaulted and Permission Sets?

  • 7 April 2021
  • 3 replies
  • 163 views

Userlevel 6
Badge +14

 

What DB table or view contains the data for Activated and Terminated employees, and what are the default Company and Site and Permission Sets?

 

 

 

 

icon

Best answer by william.klotz 8 April 2021, 01:28

View original

3 replies

Userlevel 6
Badge +14

 

What DB table or view contains the data for Activated and Terminated employees, and what are the default Company and Site and Permission Sets?

 

 

 

 

 

 

I found the API to get the default company

 

User_Profile_SYS.Get_Default('COMPANY',  user_id )

Userlevel 7
Badge +21

Hi @ZTC ZTC JGOTA ,

 

Based on your screenshots it looks like you want information about users not employee information.

The query below will provide you with the following user information.   

  1. Username
  2. Status
  3. Default Company
  4. Default Site

 

SELECT oa.username,
CASE WHEN oa.account_status = 'OPEN' THEN 'ENABLED' ELSE 'DISABLED' END AS "ACCOUNT_STATUS",
up.default_value AS "DEFAULT_COMPANY",
uas.contract AS "DEFAULT_SITE"
FROM IFSAPP.ORACLE_ACCOUNT oa, IFSAPP.USER_ALLOWED_SITE uas, IFSAPP.USER_PROFILE up
WHERE oa.default_tablespace = 'USERS'
AND oa.profile = 'DEFAULT'
AND uas.userid = oa.username
AND uas.user_site_type_db = 'DEFAULT SITE'
AND up.user_name = oa.username
AND up.entry_code_db = 'COMPANY';

 

If you want employee information there are different views to extract that information.  You could use these views as a start to extract employee information.  

  1. EMP_EMPLOYED_TIME_ROW
  2. COMPANY_PERSON_ALL

 

Regards,

William Klotz

Userlevel 6
Badge +14

Hi @ZTC ZTC JGOTA ,

 

Based on your screenshots it looks like you want information about users not employee information.

The query below will provide you with the following user information.   

  1. Username
  2. Status
  3. Default Company
  4. Default Site

 

SELECT oa.username,
CASE WHEN oa.account_status = 'OPEN' THEN 'ENABLED' ELSE 'DISABLED' END AS "ACCOUNT_STATUS",
up.default_value AS "DEFAULT_COMPANY",
uas.contract AS "DEFAULT_SITE"
FROM IFSAPP.ORACLE_ACCOUNT oa, IFSAPP.USER_ALLOWED_SITE uas, IFSAPP.USER_PROFILE up
WHERE oa.default_tablespace = 'USERS'
AND oa.profile = 'DEFAULT'
AND uas.userid = oa.username
AND uas.user_site_type_db = 'DEFAULT SITE'
AND up.user_name = oa.username
AND up.entry_code_db = 'COMPANY';

 

If you want employee information there are different views to extract that information.  You could use these views as a start to extract employee information.  

  1. EMP_EMPLOYED_TIME_ROW
  2. COMPANY_PERSON_ALL

 

Regards,

William Klotz

Thanks, very good. 

Reply