/build/static/layout/Breadcrumb_cap_w.png

Need help converting KACE search query to SQL

Working on a ticket rule to automatically close tickets that I own that were created prior to 2018. Using Advanced Search, I have found all the tickets that meet my criteria using these search settings:

  • Created during previous years (2018) AND
  • Owner User Name = my username AND
    • Status is Opened OR
    • Status is New OR
    • Status is Need More Info
When defining a ticket rule, I am unable to select these same criteria using the Wizard as selecting Created does not bring up the extended date options.

Can anybody help me convert this into a working SQL query that can then set the status of all found tickets to Closed? Thanks very much.

0 Comments   [ + ] Show comments

Answers (2)

Posted by: jmarotto 6 years ago
Fourth Degree Green Belt
1
A couple of thoughts on this.

1. Status is not Closed would be a more efficient way to look for these.
2.Use the Wizard to build the rule then modify the line for CREATED as below -
AND HD_TICKET.CREATED < '2018-01-01 00:00:00'
Posted by: ondrar 6 years ago
Black Belt
0
I'd also add that in a case like this, you could generate a report from the working Advanced Search, then copy and paste that SQL into the select statement for the Ticket Rule you built through the wizard.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ