Incidents caused by Change

Incidents caused by Change




SELECT chdt.changeid                  "Change ID", 
       chdt.title                     "Change Title", 
       Longtodate(chdt.createdtime)   "Change Created Time", 
       Longtodate(chdt.completedtime) "Change Completed Time", 
       orgaaa.first_name              "Change Requested by", 
       ownaaa.first_name              "Change Technician", 
       stagedef.NAME                  "Change Status", 
       wo.workorderid                 "Request ID", 
       aau.first_name                 "Requester", 
       qd.queuename                   "Group", 
       ti.first_name                  "Request Technician", 
       Longtodate(wo.createdtime)     "Request Created Time", 
       Longtodate(wo.completedtime)   "Request Completed Time", 
       std.statusname                 "Request Status" FROM   changedetails chdt 
       LEFT JOIN sduser orgsd 
              ON chdt.initiatorid = orgsd.userid 
       LEFT JOIN aaauser orgaaa 
              ON orgsd.userid = orgaaa.user_id 
       LEFT JOIN sduser ownsd 
              ON chdt.technicianid = ownsd.userid 
       LEFT JOIN aaauser ownaaa 
              ON ownsd.userid = ownaaa.user_id 
       LEFT JOIN stagedefinition stagedef 
              ON chdt.stageid = stagedef.stageid 
       INNER JOIN incidentcausedbychange icm 
               ON chdt.changeid = icm.changeid 
       LEFT JOIN workorder wo 
              ON icm.workorderid = wo.workorderid 
       LEFT JOIN sduser sdu 
              ON wo.requesterid = sdu.userid 
       LEFT JOIN aaauser aau 
              ON sdu.userid = aau.user_id 
       LEFT JOIN workorderstates wos 
              ON wo.workorderid = wos.workorderid 
       LEFT JOIN sduser td 
              ON wos.ownerid = td.userid 
       LEFT JOIN aaauser ti 
              ON td.userid = ti.user_id 
       LEFT JOIN statusdefinition std 
              ON wos.statusid = std.statusid 
       LEFT JOIN workorder_queue woq 
              ON wo.workorderid = woq.workorderid 
       LEFT JOIN queuedefinition qd 
              ON woq.queueid = qd.queueid 


                  New to ADSelfService Plus?

                    • Related Articles

                    • Changes that were caused by Incidents

                      SELECT chdt.changeid                  "Change ID",         chdt.title                     "Change Title",         Longtodate(chdt.createdtime)   "Change Created Time",         Longtodate(chdt.completedtime) "Change Completed Time",  ...
                    • Query to show Problems, its associated incidents and change_ (MSSQL)

                      Tested in Build MSSQL (14306) SELECT woproblem.PROBLEMID AS "Problem ID", woproblem.TITLE AS "Problem Title", "priodef"."PRIORITYNAME" AS "Problem Priority", "urgdef"."NAME" AS "Problem Urgency", "statdef"."STATUSNAME" AS "Problem Status", ...
                    • Query to list Incidents caused by Change Request (MSSQL & PGSQL)

                      Tested in Build PGSQL (14300) or MSSQL (14306) SELECT chdt.CHANGEID "Change ID",chdt.TITLE "Change Title",longtodate(chdt.CREATEDTIME) "Change Created Time",longtodate(chdt.COMPLETEDTIME) "Change Completed Time",orgaaa.FIRST_NAME "Change Requested ...
                    • Query to list the Change Requests that were caused by Incidents (MSSQL & PGSQL)

                      Tested in Build PGSQL (14300) or MSSQL (14306) SELECT chdt.CHANGEID "Change ID",chdt.TITLE "Change Title",longtodate(chdt.CREATEDTIME) "Change Created Time",longtodate(chdt.COMPLETEDTIME) "Change Completed Time",orgaaa.FIRST_NAME "Change Requested ...
                    • Problem and Associated incidents with Request id

                      MSSQL SELECT "prob"."PROBLEMID" AS "Problem ID", max("prob"."TITLE") AS "Title", longtodate(max("prob"."REPORTEDTIME")) AS "Reported Date", max("prob"."DUEBYTIME") AS "DueBy Date", max("orgaaa"."FIRST_NAME") AS "Reported by", max("probf"."UDF_CHAR1") ...