Query to list Technician Availability Chart Query Report (MSSQL & PGSQL)

Query to list Technician Availability Chart Query Report (MSSQL & PGSQL)

Tested in Build PGSQL (14300) or MSSQL (14306)


Please go to Reports-New Query Report and execute the below query

MSSQL

SELECT cre.FIRST_NAME "Created By",
LONGTODATE(TechUnavailability.CREATEDDATE) "Created Date",
avail.FIRST_NAME "Technician on Leave",
back.FIRST_NAME "Backup Technician",
LONGTODATE(DateUnAvailability.LEAVEDATE) "Leave Date",
LeaveTypeDefinition.NAME "Leave Type",
TechUnavailability.COMMENTS "Comments" FROM TechUnavailability
LEFT JOIN DateUnAvailability ON TechUnavailability.LEAVEID=DateUnAvailability.LEAVEID
LEFT JOIN LeaveTypeDefinition ON TechUnavailability.LEAVETYPEID=LeaveTypeDefinition.LEAVETYPEID
LEFT JOIN AaaUser cre ON TechUnavailability.CREATEDBY=cre.USER_ID
LEFT JOIN AaaUser avail ON TechUnavailability.TECHNICIANID=avail.USER_ID
LEFT JOIN AaaUser back ON TechUnavailability.Backuptechnicianid=back.USER_ID
ORDER BY 3,4

PGSQL

SELECT cre.FIRST_NAME "Created By",
LONGTODATE(TechUnavailability.CREATEDDATE) "Created Date",
avail.FIRST_NAME "Technician on Leave",
back.FIRST_NAME "Backup Technician",
LONGTODATE(DateUnAvailability.LEAVEDATE) "Leave Date",
LeaveTypeDefinition.NAME "Leave Type",
TechUnavailability.COMMENTS "Comments" FROM TechUnavailability
LEFT JOIN DateUnAvailability ON TechUnavailability.LEAVEID=DateUnAvailability.LEAVEID
LEFT JOIN LeaveTypeDefinition ON TechUnavailability.LEAVETYPEID=LeaveTypeDefinition.LEAVETYPEID
LEFT JOIN AaaUser cre ON TechUnavailability.CREATEDBY=cre.USER_ID
LEFT JOIN AaaUser avail ON TechUnavailability.TECHNICIANID=avail.USER_ID
LEFT JOIN AaaUser back ON TechUnavailability.Backuptechnicianid=back.USER_ID
ORDER BY 3,4



                  New to ADSelfService Plus?