cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
deadpool98
Engaged Sweeper
I need the ticket detail section to show the htblnotes properly does any one have a solution??

Select Top 1000000 htblticket.ticketid,
'#' + Cast(htblticket.ticketid As nvarchar) As Ticket,
htblticket.date As CreationDate,
htblticket.updated As LastUpdated,
htblticketstates.statename As State,
htblpriorities.name As Priority,
htblsource.name As Source,
htblusers.name As [User],
htblusers1.name As AssignedAgent,
htblusers2.name As UserLastNote,
htblticket.subject As Subject,
htblticket.lastuserreply,
htblticket.userid_lastnote,
htblticket.replysubject,
'Convert(nvarchar(max),htblnotes.note)' As [ticket detail],
htblnotes.ticketid As ticketid1
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 htblnotes On htblticket.ticketid = htblnotes.ticketid And
htblusers.userid = htblnotes.userid
Where htblusers1.name Is Null And htblticket.spam <> 'True'
Group By htblticket.ticketid,
'#' + Cast(htblticket.ticketid As nvarchar),
htblticket.date,
htblticket.updated,
htblticketstates.statename,
htblpriorities.name,
htblsource.name,
htblusers.name,
htblusers1.name,
htblusers2.name,
htblticket.subject,
htblticket.lastuserreply,
htblticket.userid_lastnote,
htblticket.replysubject,
Convert(nvarchar(max),htblnotes.note),
htblnotes.ticketid
Order By htblticket.ticketid
0 REPLIES 0