I am running a custom report as posted by your tech team on this forum to display WO closed and the technican who closed them. Every time I run it I get the error as per the subject line. The custom report is:
select aau.FIRST_NAME 'Technician', count(CASE WHEN DATEDIFF(FROM_UNIXTIME(wo.CREATEDTIME/1000),FROM_UNIXTIME(wo.COMPLETEDTIME/1000)) >= -3 and DATEDIFF(FROM_UNIXTIME(wo.CREATEDTIME/1000),FROM_UNIXTIME(wo.COMPLETEDTIME/1000)) <= -1 THEN 'More than 1 day' END ) 'More than 1 day',count(CASE WHEN DATEDIFF(FROM_UNIXTIME(wo.CREATEDTIME/1000),FROM_UNIXTIME(wo.COMPLETEDTIME/1000)) >= -7 and DATEDIFF(FROM_UNIXTIME(wo.CREATEDTIME/1000),FROM_UNIXTIME(wo.COMPLETEDTIME/1000)) <= -4 THEN 'More than 3 days' END) 'More than 3 days',count(CASE WHEN DATEDIFF(FROM_UNIXTIME(wo.CREATEDTIME/1000),FROM_UNIXTIME(wo.COMPLETEDTIME/1000)) >= -30 and DATEDIFF(FROM_UNIXTIME(wo.CREATEDTIME/1000),FROM_UNIXTIME(wo.COMPLETEDTIME/1000)) <= -8 THEN 'More than 1 week' END) 'More than 1 week',count(CASE WHEN DATEDIFF(FROM_UNIXTIME(wo.CREATEDTIME/1000),FROM_UNIXTIME(wo.COMPLETEDTIME/1000)) <= -30 THEN 'More than 1 Month' END) 'More than 1 Month' from WorkOrder_Threaded wot LEFT JOIN WorkOrder wo ON wo.WORKORDERID = wot.WORKORDERID LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID = wos.WORKORDERID LEFT JOIN SDUser sdu ON wos.OWNERID = sdu.USERID LEFT JOIN AaaUser aau ON sdu.USERID = aau.USER_ID where DATEDIFF(FROM_UNIXTIME(wo.CREATEDTIME/1000),FROM_UNIXTIME(wo.COMPLETEDTIME/1000)) < 0 and wot.WORKORDERID = wot.THD_WOID and (wo.CREATEDTIME > unix_timestamp('2007-01-01')*1000 and wo.CREATEDTIME < unix_timestamp('2007-01-29')*1000) group by 1;
Can anyone give me a clue what is going wrong as I need to run this report urgently.
Rgds
Damian