Skip to content

Instantly share code, notes, and snippets.

@msghens
Last active October 13, 2017 19:36
Show Gist options
  • Select an option

  • Save msghens/334dd93edce69072cb595a0feb9ae40c to your computer and use it in GitHub Desktop.

Select an option

Save msghens/334dd93edce69072cb595a0feb9ae40c to your computer and use it in GitHub Desktop.
Inside WITH clause for Banner job and title
select /*+ materialize */ nbrjobs_pidm as pidm,NBRJOBS_DESC as job_title,f_get_finance_desc ('FTVORGN', '1', NBRJOBS_ORGN_CODE_TS, 35) dept from
(select nbrjobs_pidm,NBRJOBS_DESC,nbrjobs_posn,NBRJOBS_ORGN_CODE_TS,NBRJOBS_EFFECTIVE_DATE,rank() over
(partition by nbrjobs_posn order by NBRJOBS_EFFECTIVE_DATE desc) efd_rank
from nbrjobs
inner join NBRBJOB on nbrjobs_pidm=nbrbjob_pidm and NBRBJOB_CONTRACT_TYPE = 'P' and NBRBJOB_POSN=nbrjobs_posn
)
where efd_rank = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment