You are here

WORKSTUDY ROLE QUERY

Submitted by ma_isaura on Tue, 11/08/2016 - 14:41

Forums:

Hello everyone!

I am having trouble getting the students with the workstudy role assigned from GORRSQL.

Can you help me identify where my query is wrong or share yours to compare?

Thanks!!

select unique nbrjobs_pidm
from
     posnctl.nbrjobs a,
     posnctl.nbrbjob
where a.nbrjobs_effective_date =
      (select max(nbrjobs_effective_date)
         from nbrjobs
         where nbrjobs_pidm = a.nbrjobs_pidm
           and nbrjobs_posn = a.nbrjobs_posn
           and nbrjobs_suff = a.nbrjobs_suff
           and nbrjobs_effective_date < sysdate)
and a.nbrjobs_status <> 'T'
and nbrbjob_contract_type  = 'P'
and a.nbrjobs_ecls_code in ('NW','PN','WS')
and a.nbrjobs_pidm = nbrbjob_pidm
and a.nbrjobs_posn = nbrbjob_posn
and a.nbrjobs_suff = nbrbjob_suff
order by nbrjobs_pidm

Luminis Version: