All posts on Sample SQL Queries

SQL Query to fetch Supervisor Direct and Indirect reportees

  • Post category:BI Publisher
  • Post comments:0 Comments
  • Post last modified:June 12, 2020
  • Reading time:3 mins read

In this article we will look into getting in the Direct and Indirect reportees of a Supervisor using SQL Query. We assign the Supervisor on the Employment screen and they get stored in the PER_ASSIGNMENT_SUPERVISORS_F table. We will have to join the PER_ALL_PEOPLE_F, PER_ALL_ASSIGNMENTS_M and PER_ASSIGNMENT_SUPERVISORS_F tables to get the manager information of an employee. However Fusion has a scheduled…

Continue ReadingSQL Query to fetch Supervisor Direct and Indirect reportees

SQL Query to get Source System IDs for all Business Objects

  • Post category:BI Publisher
  • Post comments:2 Comments
  • Post last modified:June 12, 2020
  • Reading time:2 mins read

In one of our previous articles, we have seen how to configure Source System Owner in Fusion.Defining Source System Owner for HDL in Fusion Source System Owner and Source System ID are the Source Keys which we use to load/update data using HCM Data Loader (HDL). HRC_INTEGRATION_KEY_MAP is the underlying base table which stores the Source Keys for all business…

Continue ReadingSQL Query to get Source System IDs for all Business Objects

Using Table based Valueset when DBI is unavailable

  • Post category:HCM Extract
  • Post comments:0 Comments
  • Post last modified:June 18, 2020
  • Reading time:3 mins read

When we develop integrations using HCM Extracts, we normally come across many scenarios where in we are unable to get all the attributes required using the Database Items (DBIs) for the integration using a single/multiple User Entities (UEs). If you are new to HCM Extracts, I would suggest you to read through the below articles on HCM Extracts Basics of…

Continue ReadingUsing Table based Valueset when DBI is unavailable

How to get Position Hierarchy in SQL Query?

  • Post category:BI Publisher
  • Post comments:1 Comment
  • Post last modified:June 12, 2020
  • Reading time:1 min read

We can use the below query to get the Position Hierarchy of a Position traversing up to the top level. SQL Query: SELECT hap.POSITION_CODE ,hap.position_id ,hap.name ,(SELECT name FROM HR_ALL_POSITIONS WHERE POSITION_ID = pphf.PARENT_POSITION_ID ) Parent_Position_NAME ,decode(hap.ACTIVE_STATUS, 'A', 'Active', 'I', 'Inactive') ACTIVE_Status ,pj.manager_level ,pj.name FROM HR_ALL_POSITIONS hap ,PER_JOBS_F_VL PJ ,PER_POSITION_HIERARCHY_F pphf WHERE hap.POSITION_ID = pphf.POSITION_ID AND hap.job_id = pj.job_id AND…

Continue ReadingHow to get Position Hierarchy in SQL Query?