/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 5 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 5 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.
 
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