Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
susanstarr
Engaged Sweeper

I need to add state does not equal Closed or In Audit.  Can anyone give me a leg up?

Select Top 1000000 htblticket.date As CreationDate,
htblticketstates.statename As State,
htblticket.agentid,
htblticket.ticketid,
htblticket.subject,
htblticket.fromuserid,
htblticket.ticketstateid,
htblticket.tickettypeid,
htblticket.accountid,
htblticket.lastuserreply
From htblticket
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblticket.ticketstateid

1 REPLY 1
FrankSc
Lansweeper Tech Support
Lansweeper Tech Support

Dear susantarr, 
Adding the where clause below should do that. 

Where htblticketstates.statename NOT IN ('Closed', 'In Audit')

Protip: Did you know that most current AI engines do an excellent job in adding or writing code?
Prompting your request in Copilot, for example, provides you with an accurate report within seconds.

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now