A useful query but it doesn't seem to give the full picture
We have been using the table below to show jobs submitted in the last quarter grouped by company (using a custom field called company). However, some of the requests come in from requesters and probes that do not have any data in the company field and their jobs do not appear to be included in the quarterly report.
e.g. if we do another report showing jobs by technicians there are an extra 100+ jobs compared with the query below. The top line of this report does show a cell with no company in it, but the total for that line is 1.
Have I missed something obvious?
Thanks.
SELECT cd.CATEGORYNAME 'Category',reqf.UDF_CHAR1 'Company',reqf.UDF_CHAR1 'Company' FROM WorkOrder_Threaded wot INNER JOIN WorkOrder wo ON wot.WORKORDERID=wo.WORKORDERID LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID LEFT JOIN CategoryDefinition cd ON wos.CATEGORYID=cd.CATEGORYID LEFT JOIN Requester_Fields reqf ON wo.REQUESTERID=reqf.USERID WHERE (((wo.CREATEDTIME >= <from_thisweek>) AND ((wo.CREATEDTIME != 0) AND (wo.CREATEDTIME IS NOT NULL))) AND ((wo.CREATEDTIME <= <to_thisweek>) AND ((wo.CREATEDTIME != 0) AND (wo.CREATEDTIME IS NOT NULL)))) AND wot.THD_WOID=wot.WORKORDERID
New to ADSelfService Plus?