Notification

Icon
Error

not taking second condition - I have a query that is working fine to a point, once i place a second or statement in the query the

Posted: Friday, October 25, 2019 9:11:13 PM(UTC)
JKnapik

JKnapik

Member Original PosterPosts: 3
0
Like
Select Top 1000000 htblticket.ticketid,
'#' + Cast(htblticket.ticketid As nvarchar) As Ticket,
htblusers1.name As AssignedAgent,
htblticket.date As CreationDate,
htblticket.updated As LastUpdated,
'../helpdesk/icons/' + htbltickettypes.icon As icon
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
Where (htblticket.updated < GetDate() - 3 And htbltickettypes.typename <>
'Employee Seperation') Or
(htbltickettypes.typename <> 'project')
Order By htblticket.ticketid
JKnapik
#1JKnapik Member Original PosterPosts: 3  
posted: 10/28/2019 4:45:22 PM(UTC)
how can i get the report to exclude both project and employee separation from the result

Select Top 1000000 htblticket.ticketid,
'#' + Cast(htblticket.ticketid As nvarchar) As Ticket,
htblusers1.name As AssignedAgent,
htblticket.date As CreationDate,
htblticket.updated As LastUpdated,
'../helpdesk/icons/' + htbltickettypes.icon As icon
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
Where (htblticket.updated < GetDate() - 3 And htbltickettypes.typename <>
'Employee Seperation') Or
(htbltickettypes.typename <> 'project')
Order By htblticket.ticketid

Active Discussions

Lansweeper iManage Client deployment
by  CyberCitizen   Go to last post Go to first unread
Last post: Today at 3:09:47 AM(UTC)
Lansweeper Missing hyperv host details for guest asset LAN-4130
by  danielm  
Go to last post Go to first unread
Last post: 12/7/2019 7:15:56 AM(UTC)
Lansweeper Lansweeper showing MAC address instead of name
by  crashff   Go to last post Go to first unread
Last post: 12/6/2019 10:26:25 PM(UTC)
Lansweeper Dell Warranty Lookup - Incorrect Information
by  Trenton Knew  
Go to last post Go to first unread
Last post: 12/6/2019 10:17:15 PM(UTC)
Lansweeper Incoming Email Parse
by  UEFT   Go to last post Go to first unread
Last post: 12/6/2019 5:46:22 PM(UTC)
Lansweeper SSH - Keyboard Interactive Authentication
by  KevinA-REJIS  
Go to last post Go to first unread
Last post: 12/6/2019 5:22:21 PM(UTC)
Lansweeper Custom OID Scanning / multible OIDs with wildcards
by  Esben.D  
Go to last post Go to first unread
Last post: 12/6/2019 11:57:18 AM(UTC)