I don't like using the Category CC_LIST so have a custom ticket rule set up to include specific addresses to the ticket CC_LIST when a specific category is selected on a new ticket.  My update script is not working though. I've included the Update SQL below to show what I've done.  I did swapp out the emails I used for a generic one just for this post.  The addresses I am really using are valid though. I've tried with one or multiple email addresses and it will not update the CC_LIST. Any and all help is greatly appreciated.

set HD_TICKET.CC_LIST as 'generic@email.com, generic2@email.com'


When i run the rule I get the following error in the run log:


mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as 'generic@email.com, generic2@email.com'
where CAT.ID = '150' and HD_TICKET.HD_CATEGORY_ID = CAT.I' at line 2] in EXECUTE("update HD_TICKET , HD_CATEGORY AS CAT
set HD_TICKET.CC_LIST as 'generic@email.com, generic2@email.com'
where CAT.ID = '150' and HD_TICKET.HD_CATEGORY_ID = CAT.ID")


Answer Summary:
update HD_TICKET T set T.CC_LIST = 'generic@email.com, generic2@email.com' WHERE T.ID IN () This is how I ended up setting up the Update query leaving the requirements to the select query
0 Comments   [ + ] Show Comments


Please log in to comment

Community Chosen Answer


What happens when you change "set HD_TICKET.CC_LIST as" to "set HD_TICKET.CC_LIST ="

Answered 03/08/2013 by: dugullett
Red Belt

  • I changed it to an = sign but it is still not updating the ticket. Though I don't get an error now. it says that it updated 5 rows though this ticket is not updated with any addresses in the CC_LIST. Any other suggestions?
  • Thanks dugullett, got me on my way to figuring it out a little more
Please log in to comment



Your rule doesn't include a statement to indicate which ticket to update. Normally it should include something like WHERE HD_TICKET.ID in <ticket_ids>


Answered 03/11/2013 by: chucksteel
Red Belt

  • Thanks Chucksteel, I kind of figured that out when I tested it and changed the CC_List on 500+ tickets. :-( Lesson learned lol
  • Do I have to set the <ticket_ids> variable or does KACE assign that to the ticket id's that come from the select query in the rule
    • KACE populates it based on the tickets that match the select query.
Please log in to comment
This content is currently hidden from public view.
Reason: Removed by member request
For more information, visit our FAQ's.

Answer this question or Comment on this question for clarity