Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DISTINCT
- A.studyprogramid,
- A.studyprogramname,
- A.FACULTYID,
- fac.FACULTYNAME,
- org.orgstructureid,
- org.orgstructurename,
- em.employeeid,
- em.fullname
- FROM
- masterdata.studyprogram A
- JOIN masterdata.relation B ON
- ( A.studyprogramid = secondid
- AND secondtable = 'STUDYPROGRAM' )
- JOIN masterdata.organizationstructure org ON
- ( firstid = org.orgstructureid
- AND firsttable = 'ORGANIZATIONSTRUCTURE' )
- JOIN masterdata.employeemaster em ON
- ( org.orgstructureid = em.worklocation )
- JOIN FRAMEWORK1.USERS us ON
- (us.username = em.employeeid)
- JOIN FACULTIES fac ON
- (fac.facultyid = A.facultyid)
- WHERE
- us.userid = '171806'
- AND B.activestatus = 'Y'
- AND em.activestatus = 'Y'
- AND org.active = 'Y'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement