{"id":18205,"date":"2019-04-25T19:42:34","date_gmt":"2019-04-25T22:42:34","guid":{"rendered":"https:\/\/orabr.com\/?p=18205"},"modified":"2019-04-25T19:46:26","modified_gmt":"2019-04-25T22:46:26","slug":"-duvida-oracle-ame-approvals-managment-4","status":"publish","type":"post","link":"https:\/\/orabr.virttus.com\/?p=18205","title":{"rendered":"D\u00favida Oracle AME (Approvals Managment)"},"content":{"rendered":"<p><HTML><HTML><\/p>\n<div>  <span style=\"display:none\">&nbsp;<\/span>    <!--~-|**|PrettyHtmlStartT|**|-~-->  <\/p>\n<div id=\"ygrp-mlmsg\" style=\"position:relative;\">\n<div id=\"ygrp-msg\" style=\"z-index: 1;\">  <!--~-|**|PrettyHtmlEndT|**|-~-->        <\/p>\n<div id=\"ygrp-text\" >\n<div class=\"WordSection1\">\n<p class=\"MsoNormal\"><span style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\">Marcelo, boa noite!<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\"><o>&nbsp;<\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\">Segue abaixo as querys que o workflow core utiliza para identificar o Supervisor com base no employee_id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\"><o>&nbsp;<\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\">Caso o Setup seja Aprova\u00e7\u00e3o por Supervisor\u00a0\u00a0\u00a0\u00a0 <o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\"><o>&nbsp;<\/o><\/span><\/p>\n<p class=\"MsoNormal\"><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">SELECT<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">DISTINCT<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> Pafe.supervisor_id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">FROM<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0 Per_All_Assignments_f pafe<\/span><span lang=\"EN-US\" style=\"font-size:9..0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><i><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:green;background:white;\">&#8212; &lt;BUG 6615913&gt;<\/span><\/i><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Per_All_People_f ppfs<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><i><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:green;background:white;\">&#8212; &lt;BUG 6615913&gt;<\/span><\/i><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Per_All_Assignments_f pafs<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><i><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:green;background:white;\">&#8212; &lt;BUG 6615913&gt;<\/span><\/i><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 per_person_types_v ppts<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 per_person_type_usages_f pptu<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">WHERE<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 pafe.person_id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:yellow;\">p_empid<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> Trunc<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">SYSDATE<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">BETWEEN<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> pafe.Effective_Start_Date<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> pafe.Effective_End_Date<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> pafe.Primary_Flag <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">&#8216;Y&#8217;<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> pafe.Assignment_Type <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">IN<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(&#8216;E&#8217;,&#8217;C&#8217;)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> ppfs.Person_Id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> pafe.Supervisor_Id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> Trunc<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">SYSDATE<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">BETWEEN<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> ppfs.Effective_Start_Date<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0<\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> ppfs.Effective_End_Date<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> Pafs.Person_Id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> ppfs.Person_Id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> Trunc<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">SYSDATE<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">BETWEEN<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> pafs.Effective_Start_Date<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0<\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> pafs.Effective_End_Date<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> pafs.Primary_Flag <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">&#8216;Y&#8217;<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> pafs.Assignment_Type <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">IN<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(&#8216;E&#8217;,&#8217;C&#8217;)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> pptu.Person_Id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> ppfs.Person_Id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> ppts.person_type_id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> pptu.person_type_id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> ppts.System_Person_Type <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">IN<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(&#8216;EMP&#8217;,&#8217;EMP_APL&#8217;,&#8217;CWK&#8217;);<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\"><o>&nbsp;<\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\">Caso o Setup seja Aprova\u00e7\u00e3o por Hierarquia de Posi\u00e7\u00e3o<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\"><o>&nbsp;<\/o><\/span><\/p>\n<p class=\"MsoNormal\"><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">SELECT<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> POEH.superior_id<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> poeh.superior_level<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> HREC.full_name<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">FROM<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0 PO_EMPLOYEES_CURRENT_X HREC<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0 <\/span><i><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:green;background:white;\">&#8212; &lt;BUG 6615913&gt;<\/span><\/i><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PO_EMPLOYEE_HIERARCHIES POEH<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">WHERE<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 POEH.position_structure_id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> p_approval_path_id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 POEH.employee_id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:yellow;\">p_empid<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 HREC.employee_id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> POEH.superior_id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 POEH.superior_level <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">&gt;<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">0<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">UNION<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">ALL<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">SELECT<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> poeh.superior_id<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9..0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> poeh.superior_level<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> cwk.full_name<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">FROM<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0 PER_ALL_PEOPLE_F CWK<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PO_EMPLOYEE_HIERARCHIES POEH<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9..0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PER_ALL_ASSIGNMENTS_F A<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PER_PERIODS_OF_SERVICE PS<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">WHERE<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 poeh.position_structure_id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> p_approval_path_id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 \u00a0\u00a0poeh.employee_id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:yellow;\">p_empid<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 cwk.person_id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> poeh.superior_id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 poeh.superior_level <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">&gt;<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">0<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 nvl<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">fnd_profile.value<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(&#8216;HR_TREAT_CWK_AS_EMP&#8217;),&#8217;N&#8217;)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">&#8216;Y&#8217;<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 A.PERSON_ID\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> CWK.PERSON_ID<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 A.PERSON_ID\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> PS.PERSON_ID<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 A.ASSIGNMENT_TYPE<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=&#8217;E&#8217;<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9..0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 CWK.EMPLOYEE_NUMBER <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">IS<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">NOT<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">NULL<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 A.PERIOD_OF_SERVICE_ID <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> PS.PERIOD_OF_SERVICE_ID<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 A.PRIMARY_FLAG\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">&#8216;Y&#8217;<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 TRUNC<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">SYSDATE<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">)<\/span><span lang=\"EN-US\" style=\"font-size:9..0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">BETWEEN<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> CWK.EFFECTIVE_START_DATE <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> CWK.EFFECTIVE_END_DATE<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 TRUNC<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">SYSDATE<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">BETWEEN<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9..0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> A.EFFECTIVE_START_DATE <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> A.EFFECTIVE_END_DATE<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 PS.ACTUAL_TERMINATION_DATE<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">&gt;=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> TRUNC<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">sysdate<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">OR<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> PS.ACTUAL_TERMINATION_DATE <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">IS<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">NULL<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">UNION<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">ALL<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">SELECT<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 POEH.SUPERIOR_ID <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> POEH.SUPERIOR_LEVEL<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> CWK.FULL_NAME<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">FROM<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0 PER_ALL_PEOPLE_F CWK<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PO_EMPLOYEE_HIERARCHIES POEH<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9..0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PER_ALL_ASSIGNMENTS_F A<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PER_PERIODS_OF_PLACEMENT PP<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">WHERE<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 poeh.position_structure_id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> p_approval_path_id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 poeh.employee_id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:yellow;\">p_empid<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 cwk.person_id <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> poeh.superior_id<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 poeh.superior_level <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">&gt;<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">0<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 nvl<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">fnd_profile.value<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(&#8216;HR_TREAT_CWK_AS_EMP&#8217;),&#8217;N&#8217;)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">&#8216;Y&#8217;<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 A.PERSON_ID\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> CWK.PERSON_ID<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 A.PERSON_ID\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> PP.PERSON_ID<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 A.ASSIGNMENT_TYPE<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=&#8217;C&#8217;<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 CWK.NPW_NUMBER <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">IS<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">NOT<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">NULL<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 A.PERIOD_OF_PLACEMENT_DATE_START <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> PP.DATE_START<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 A.PRIMARY_FLAG\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">&#8216;Y&#8217;<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 TRUNC<\/span><span lang=\"EN-US\" style=\"font-size:9..0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">SYSDATE<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">BETWEEN<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> CWK.EFFECTIVE_START_DATE <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> CWK.EFFECTIVE_END_DATE<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 TRUNC<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">SYSDATE<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">BETWEEN<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> A.EFFECTIVE_START_DATE <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> A.EFFECTIVE_END_DATE<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">AND<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0\u00a0\u00a0 <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 PP.ACTUAL_TERMINATION_DATE<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">&gt;=<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> TRUNC<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">(<\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">sysdate<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">OR<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> PP.ACTUAL_TERMINATION_DATE <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">IS<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9..0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">NULL<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">)<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\">\u00a0 <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">ORDER<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> <\/span><b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:blue;background:white;\">BY<\/span><\/b><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> superior_level<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">,<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:navy;background:white;\"> full_name<\/span><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;background:white;\">;<\/span><span lang=\"EN-US\" style=\"font-size:9..0pt;font-family:&quot;Courier New&quot;;color:red;\"><o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;\"><o>&nbsp;<\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-size:9.0pt;font-family:&quot;Courier New&quot;;color:red;\"><o>&nbsp;<\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\">Abs.<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\">Eberton<o><\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\"><o>&nbsp;<\/o><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN-US\" style=\"font-family:&quot;Times New Roman&quot;,serif;color:#4472C4;\"><o>&nbsp;<\/o><\/span><\/p>\n<div>\n<div style=\"border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm;\">\n<p class=\"MsoNormal\"><b>De:<\/b>  &lt;&gt; <br \/><b>Enviada em:<\/b> quinta-feira, 25 de abril de 2019 15:33<br \/><b>Para:<\/b> <br \/><b>Assunto:<\/b>   D\u00favida Oracle AME (Approvals Managment)<o><\/o><\/p>\n<\/div>\n<\/div>\n<p class=\"MsoNormal\"><o>&nbsp;<\/o><\/p>\n<p class=\"MsoNormal\">&nbsp; <o><\/o><\/p>\n<div id=\"ygrp-mlmsg\">\n<div id=\"ygrp-msg\">\n<div id=\"ygrp-text\">\n<p>Boa tarde!<o><\/o><\/p>\n<p>&nbsp;<o><\/o><\/p>\n<p>Se for hierarquia de supervis\u00e3o, pode obter os limites e pessoas com:<o><\/o><\/p>\n<p>PER_ALL_PEOPLE_F<o><\/o><\/p>\n<p>PER_ALL_ASSIGNMENTS_F<o><\/o><\/p>\n<p>PO_CONTROL_RULES<o><\/o><\/p>\n<p>PO_CONTROL_GROUPS<o><\/o><\/p>\n<p>PO_POSITION_CONTROLS<o><\/o><\/p>\n<p>PER_ALL_POSITIONS<o><\/o><\/p>\n<p>&nbsp;<o><\/o><\/p>\n<p>Se for hierarquia de posi\u00e7\u00e3o, pode acrescentar:<o><\/o><\/p>\n<p>PER_POSITION_STRUCTURES<o><\/o><\/p>\n<p>PER_POS_STRUCTURE_VERSIONS_V<o><\/o><\/p>\n<p>PER_POS_STRUCTURE_ELEMENTS_V<o><\/o><\/p>\n<p>&nbsp;<o><\/o><\/p>\n<p>&nbsp;<o><\/o><\/p>\n<p>Att.,<o><\/o><\/p>\n<p>Gustavo C. Peix\u00f4to<\/p>\n<p>Em Qui 25\/04\/19 15:09, Marcelo Macedo <a href=\"mailto:marcelo.rmacedo@yahoo.com.br\">marcelo.rmacedo@yahoo.com.br<\/a>  <a href=\"mailto:\"><\/a> escreveu:<o><\/o><\/p>\n<blockquote style=\"margin-top:5.0pt;margin-bottom:5.0pt;\">\n<p class=\"MsoNormal\">&nbsp; <o><\/o><\/p>\n<div>\n<div>\n<div>\n<p>&nbsp;<o><\/o><\/p>\n<div>\n<div>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">Boa tarde pessoal,<o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">&nbsp;<o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">Um amigo est\u00e1 precisando de uma ajuda, seja a d\u00favida:<o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">&nbsp;<o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><em><b><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">&quot;Estou precisando fazer um select a partir de um usu\u00e1rio e obter a hierarquia de aprova\u00e7\u00e3o (com o limites para cada um) para cima e para baixo na arvore hier\u00e1rquica do Oracle AME (Approvals Managment).&nbsp;<\/span><\/b><\/em><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\"> <o><\/o><\/span><\/p>\n<div>\n<p class=\"MsoNormal\"><em><b><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">Algu\u00e9m poderia ajudar informando quais as tabelas comp\u00f5em estas informa\u00e7\u00f5es?<\/span><\/b><\/em><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\"><o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><em><b><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">&nbsp;<\/span><\/b><\/em><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\"><o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><em><b><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">Qualquer sugest\u00e3o \u00e9 bem vinda.&nbsp;<\/span><\/b><\/em><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\"><o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><em><b><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">&nbsp;<\/span><\/b><\/em><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\"><o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><em><b><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">Grato&quot;<\/span><\/b><\/em><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\"><o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">&nbsp;<o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">&nbsp;<o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">&nbsp;<o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">ats,<o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">&nbsp;<o><\/o><\/span><\/p>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;\">Marcelo Macedo<o><\/o><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/blockquote>\n<\/div>\n<div>\n<p class=\"MsoNormal\"><span style=\"color:white;\"><o><\/o><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/p><\/div>\n<p>               <\/HTML><\/HTML><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Marcelo, boa noite! &nbsp; Segue abaixo as querys que o workflow core utiliza para identificar o Supervisor com base no employee_id &nbsp; Caso o&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-18205","post","type-post","status-publish","format-standard","hentry","category-base-de-conhecimentos"],"_links":{"self":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/18205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18205"}],"version-history":[{"count":0,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/18205\/revisions"}],"wp:attachment":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}