Saturday, 30 November 2013

Query to fetch the 'Resource History' in OIM



--Resource History
select osi.sch_key, osi.orc_key, osi.mil_key,
to_char(osi.osi_assigned_date,'dd-mon-rrrr hh24:mi:ss') ,to_char(OSI.OSI_UPDATE,'dd-mon-rrrr hh24:mi:ss')
,osi.rsc_key, sch.sch_status, sch.sch_data, mil.mil_name, SCH.sch_update,to_char(sysdate,'dd-mon-rrrr hh24:mi:ss')
from osi, sch, mil
where osi.sch_key = sch.sch_key
and osi.mil_key = mil.mil_key
and osi.orc_key in (ENTER THE ORC KEY HERE)
order by sch.sch_update desc;

4 comments:

  1. A small Typo in the join:
    where osi.sch_key = sch.ssch_key
    should be
    where osi.sch_key = sch.sch_key

    ReplyDelete
  2. Helped me out! Thanks for sharing!

    ReplyDelete
  3. Hi,
    How to get the ENTER THE ORC KEY HERE

    ReplyDelete
  4. select Orc_key from oiu where usr_key in (select usr_key from usr where usr_emp_no = #usr_emp_no)

    ReplyDelete