/build/static/layout/Breadcrumb_cap_w.png

Looking for KACE sql query to update ticket title

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>))

0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: chucksteel 7 years ago
Red Belt
2

Top Answer

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>))


Comments:

Don't be a Stranger!

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

Sign up! or login

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