Notification

Icon
Error

Trying to report on tickets that aren't closed

Posted: Thursday, March 19, 2020 8:06:02 PM(UTC)
pryan67

pryan67

Member Original PosterPosts: 76
0
Like
I have this report, but I'm getting duplicate tickets listed, and when I eliminate the duplicates (using Excel) it only shows about half the number of tickets that the helpdesk shows when I filter with the same criteria


Any thoughts?


Select Distinct Top 1000000 htblticket.ticketid As ticketid1,
'#' + Cast(htblticket.ticketid As nvarchar) As Ticket,
htblticket.date As CreationDate,
htblticket.updated As LastUpdated,
htbltickettypes.typename As Type,
htblticketstates.statename As State,
htblpriorities.name As Priority,
htblsource.name As Source,
htblusers.name As [User],
htblusers1.name As AssignedAgent,
htblusers2.name As UserLastNote,
'../helpdesk/icons/' + htbltickettypes.icon As icon,
htblticket.subject As Subject,
htblticketcustomfield.fieldid,
htblticketcustomfield.data,
htblticketcustomfield.data As Location
From htblticket
Inner Join htblpriorities On htblpriorities.priority = htblticket.priority
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblticket.ticketstateid
Inner Join htblusers On htblusers.userid = htblticket.fromuserid
Left Join htblagents On htblagents.agentid = htblticket.agentid
Left Join htblusers htblusers1 On htblusers1.userid = htblagents.userid
Inner Join htbltickettypes On htblticket.tickettypeid =
htbltickettypes.tickettypeid
Inner Join htblsource On htblticket.sourceid = htblsource.sourceid
Inner Join htblusers htblusers2 On htblticket.userid_lastnote =
htblusers2.userid
Inner Join htblticketcustomfield On htblticket.ticketid =
htblticketcustomfield.ticketid
Where htblticketstates.statename Not In ('closed', 'resolved')
Order By ticketid1

Active Discussions

Action Find lost space the easy way (spacesniffer.exe)
by  krozar   Go to last post Go to first unread
Last post: 5/5/2020 10:27:33 PM(UTC)
Lansweeper Querying a web server or web services
by  mmo  
Go to last post Go to first unread
Last post: 5/5/2020 9:00:36 PM(UTC)
Action Password Status
by  brodiemac-too   Go to last post Go to first unread
Last post: 4/23/2020 9:01:03 PM(UTC)
Action Email user
by  Michael Kop  
Go to last post Go to first unread
Last post: 4/7/2020 11:24:12 AM(UTC)
Lansweeper actualizacion de datos importando csv
by  jhon freddy   Go to last post Go to first unread
Last post: 3/31/2020 9:04:45 PM(UTC)
Lansweeper Asset Actions - RunAs Prompt
by  Socal_s197  
Go to last post Go to first unread
Last post: 3/26/2020 10:02:16 PM(UTC)
Lansweeper Remote Registry 2019
by  CyberCitizen   Go to last post Go to first unread
Last post: 3/6/2020 12:25:39 AM(UTC)
Lansweeper Installation Parameters
by  Florian_Eigsi  
Go to last post Go to first unread
Last post: 3/3/2020 10:17:18 AM(UTC)