Report to show amended Due Dates

Report to show amended Due Dates

Database : PGSQL

Query


SELECT wo.WORKORDERID "Request ID",
max(wo.title)"Subject",
longtodate(max(woh.operationtime))"Changed Time" FROM WorkOrder wo
LEFT JOIN workorderhistory woh on wo.workorderid=woh.workorderid
LEFT JOIN workorderhistorydiff wohd on woh.historyid=wohd.historyid
WHERE (wohd.columnname like '%DUEBYTIME%')
and ((wohd.prev_value)!='-1') and woh.operationownerid!='1'
and ((wohd.current_value)!='-1')
and (to_timestamp(wo.createdtime/1000) between date '2013-01-01' and date '2013-12-31')
group by wo.workorderid
order by 1

Change the dates based on your requirement.

Krishna Bharat

ServiceDesk Plus - MSP Support team

                New to ADSelfService Plus?