Advertisement
ma39isy

Untitled

Jul 15th, 2024
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.     A.studyprogramid,
  3.     A.studyprogramname,
  4.     A.FACULTYID,
  5.     fac.FACULTYNAME,
  6.     C.positionid,
  7.     C.positionname,
  8.     em.employeeid,
  9.     em.fullname
  10. FROM
  11.     masterdata.studyprogram A
  12. JOIN masterdata.relation B ON
  13.     ( A.studyprogramid = secondid
  14.         AND secondtable = 'STUDYPROGRAM' )
  15. JOIN humanresource.position C ON
  16.     ( B.firstid = positionid
  17.         AND B.firsttable = 'POSITION' )
  18. JOIN masterdata.employeemaster em ON
  19.     ( em.structuralposition = C.positionname )
  20. JOIN FRAMEWORK1.USERS us ON
  21.     (us.username = em.employeeid)
  22. JOIN FACULTIES fac ON
  23.     (fac.facultyid = A.facultyid)
  24. WHERE
  25.     us.userid = 99442
  26.     AND B.activestatus = 'Y'
  27.     AND em.activestatus = 'Y'
  28.     AND C.activestatus = 'Y'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement