→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
07-12-2021 11:24 AM
Solved! Go to Solution.
07-12-2021 09:53 PM
Select Top 1000000 htblticket.ticketid,
'#' + 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,
htblusers3.name As SubscribedAgent,
'../helpdesk/icons/' + htbltickettypes.icon As icon,
htblticket.subject As Subject
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 htblticketsubscribers On htblticket.ticketid =
htblticketsubscribers.ticketid
Inner Join htblagents htblagents1 On htblagents1.agentid =
htblticketsubscribers.agentid
Inner Join htblusers htblusers3 On htblusers3.userid = htblagents1.userid
Where htblticket.spam <> 'True'
Order By htblticket.ticketid
07-15-2021 08:36 AM
07-12-2021 09:53 PM
Select Top 1000000 htblticket.ticketid,
'#' + 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,
htblusers3.name As SubscribedAgent,
'../helpdesk/icons/' + htbltickettypes.icon As icon,
htblticket.subject As Subject
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 htblticketsubscribers On htblticket.ticketid =
htblticketsubscribers.ticketid
Inner Join htblagents htblagents1 On htblagents1.agentid =
htblticketsubscribers.agentid
Inner Join htblusers htblusers3 On htblusers3.userid = htblagents1.userid
Where htblticket.spam <> 'True'
Order By htblticket.ticketid
02-23-2023 11:34 PM
Is it possible to create a report that shows active tickets (with an assigned agent) that don't have a secondary agent assigned? By active tickets I mean all tickets that don't have a ticket state of "Closed". Thank you.
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now