Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- A.studyprogramid,
- A.studyprogramname,
- A.FACULTYID,
- fac.FACULTYNAME,
- C.positionid,
- C.positionname,
- em.employeeid,
- em.fullname
- FROM
- masterdata.studyprogram A
- JOIN masterdata.relation B ON
- ( A.studyprogramid = secondid
- AND secondtable = 'STUDYPROGRAM' )
- JOIN humanresource.position C ON
- ( B.firstid = positionid
- AND B.firsttable = 'POSITION' )
- JOIN masterdata.employeemaster em ON
- ( em.structuralposition = C.positionname )
- JOIN FRAMEWORK1.USERS us ON
- (us.username = em.employeeid)
- JOIN FACULTIES fac ON
- (fac.facultyid = A.facultyid)
- WHERE
- us.userid = 99442
- AND B.activestatus = 'Y'
- AND em.activestatus = 'Y'
- AND C.activestatus = 'Y'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement