/build/static/layout/Breadcrumb_cap_w.png

Systems Management Question


Looking for KACE sql query to update ticket title

02/21/2017 1270 views
Hello, I'm looking for help writing a rule to update the ticket title from information from within the ticket. I'm able to get it to update by using only one custom field however having issue when adding the other two in the mix.

Any help would be appreciated.


Current query is:

update HD_TICKET
    set HD_TICKET.TITLE = HD_TICKET.CUSTOM_FIELD_VALUE4, HD_TICKET.CUSTOM_FIELD_VALUE5, HD_TICKET.CUSTOM_FIELD_VALUE7
 
  where 
        (HD_TICKET.ID in (<TICKET_IDS>))
Answer Summary:
0 Comments   [ + ] Show comments

Comments


Answer Chosen by the Author

2
You need to concatenate the fields together:
update HD_TICKET
    set HD_TICKET.TITLE = concat(HD_TICKET.CUSTOM_FIELD_VALUE4, HD_TICKET.CUSTOM_FIELD_VALUE5, HD_TICKET.CUSTOM_FIELD_VALUE7)
 
  where 
        (HD_TICKET.ID in (<TICKET_IDS>))
You can add additional formatting if needed, e.g. a dash between field 4 and field 5:
update HD_TICKET
    set HD_TICKET.TITLE = concat(HD_TICKET.CUSTOM_FIELD_VALUE4, " - ", HD_TICKET.CUSTOM_FIELD_VALUE5, HD_TICKET.CUSTOM_FIELD_VALUE7)
 
  where 
        (HD_TICKET.ID in (<TICKET_IDS>))

Answered 02/22/2017 by: chucksteel
Red Belt

 
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