Query to get Info about request technician change and changed by

Query to get Info about request technician change and changed by

Version : 14001
DB: MSSQL / PGSQL


OUTPUT :





SELECT wo.WORKORDERID "Request ID",
(aau.FIRST_NAME) "CREATEDBY",
(wo.TITLE) "Subject",
(std.STATUSNAME) "Request Status",
aau.FIRST_NAME AS "Changed By",
auTech.FIRST_NAME as "Tech Changed From",
auNextTech.FIRST_NAME as "Tech Changed To" FROM WorkOrder wo
LEFT JOIN SDUser sdu ON wo.CREATEDBYID=sdu.USERID
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID
LEFT JOIN StatusDefinition std ON wos.STATUSID=std.STATUSID
LEFT JOIN WO_Assessment woa ON wo.WORKORDERID=woa.WORKORDERID
left JOIN WO_Tech_Info wti ON woa.ASSESSMENTID=wti.ASSESSMENTID
LEFT JOIN AaaUser auTech ON wti.TECHNICIANID=auTech.USER_ID
LEFT JOIN AaaUser auNextTech ON wti.NEXTTECHNICIANID=auNextTech.USER_ID
WHERE (wo.ISPARENT='1') and wti.TECHNICIANID is NULL ORDER BY 1

      New to ADSelfService Plus?