Advertisement
ma39isy

Untitled

Jun 28th, 2024
946
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT DISTINCT
  2.     A.studyprogramid,
  3.     A.studyprogramname,
  4.     A.FACULTYID,
  5.     fac.FACULTYNAME,
  6.     org.orgstructureid,
  7.     org.orgstructurename,
  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 masterdata.organizationstructure org ON
  16.     ( firstid = org.orgstructureid
  17.         AND firsttable = 'ORGANIZATIONSTRUCTURE' )
  18. JOIN masterdata.employeemaster em ON
  19.     ( org.orgstructureid = em.worklocation )
  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 = '171806'
  26.     AND B.activestatus = 'Y'
  27.     AND em.activestatus = 'Y'
  28.     AND org.active = 'Y'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement