Department head details

Department head details

This report is used to get the complete list of Department and the department head configured in the application

SELECT dept.deptid "Department ID",
       dept.deptname "Department Name",
       dept.phoneno "Phone No",
       dept.fax "Fax",
       sdorg.name "Site Name",
       aa.first_name "Department Head",
       dept.deptdesc "Department Description",
       da.first_name "Approver" FROM departmentdefinition dept
LEFT JOIN sduser sd ON sd.userid=dept.deptheadid
LEFT JOIN aaauser aa ON aa.user_id=sd.userid
LEFT JOIN sitedefinition site ON site.siteid=dept.siteid
LEFT JOIN sdorganization sdorg ON sdorg.org_id=site.siteid
LEFT JOIN RoleToUserMapping rum ON dept.deptid=rum.EntityValue
LEFT JOIN aaauser da ON rum.userid=da.user_id
ORDER BY 5



                  New to ADSelfService Plus?

                    • Related Articles

                    • Requester details

                      This report is used to find the Requester complete details.  SELECT AaaUser.USER_ID, AaaUser.FIRST_NAME "FullName", AaaLogin.NAME "LoginName", AaaLogin.DOMAINNAME "Domain", AaaContactInfo.EMAILID "Email", DepartmentDefinition.DEPTNAME "Department", ...
                    • How to assign a department to site and requester

                      1. How to assign department to new sites - > When a new site is created, it would have a 'General' department which would be available by default. In order to add additional departments, go to Admin - > Account details - > Departments - > select the ...
                    • Purchase details

                      SELECT po.POCUSTOMID "PO Number", max(po.PONAME) "PO Name", max(po.TERMS) "PO Terms", LONGTODATE(max(po.DATEORDERED)) "Ordered Date", max(pos.STATUSNAME) "PO Status", max(poa.FIRST_NAME) "Purchase Requester", max(po.SHIPTO) "Ship To", max(paao.NAME) ...
                    • Contract Details

                      SELECT mcdt.Contractid "Contract ID", mcdt.CONTRACTNAME "Contract Name", mcdt.comments "Description", contractcategory.Categoryname "Contract Type", LONGTODATE(mcdt.CREATEDDATE) "Created Time", LONGTODATE(mcdt.FROMDATE) "From Date", ...
                    • Query to show request details along with technician's and requester's department (MSSQL & PGSQL)

                      Tested in Build PGSQL (14300) or MSSQL (14306) Along with technician's department: SELECT wo.WORKORDERID AS "Request ID", aau.FIRST_NAME AS "Requester", wo.TITLE AS "Subject", cd.CATEGORYNAME AS "Category", scd.NAME AS "Subcategory", qd.QUEUENAME AS ...