How can I create an update query where it will move the ticket to another queue and also change the category to 'Other' that is in the new queue?

Two separate update queries that work are:

UPDATE HD_TICKET
SET HD_TICKET.HD_QUEUE_ID = 7
AND HD_TICKET.ID = <TICKET_IDS>

and

update HD_TICKET, HD_CATEGORY as T5
    set HD_TICKET.HD_CATEGORY_ID = T5.ID
  where T5.NAME = 'Other' and 
HD_TICKET.HD_QUEUE_ID = T5.HD_QUEUE_ID and 
        (HD_TICKET.ID in (<TICKET_IDS>))
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0
You can't move a ticket between queues by adjusting HD_QUEUE_ID unless both queues are 100% identical (same fields with the same IDs in the database). This is highly unlikely, so you'd have to build out the query to map field data appropriately when you move queues. It would work by just changing HD_QUEUE_ID, but most if not all of the field data would be in random/incorrect fields in the new queue.

If you weren't already aware, KACE does offer fee-based Professional Services to write this for you.
Answered 10/19/2017 by: airwolf
Tenth Degree Black Belt

Please log in to comment
0
Thanks for your response.
I figured that out after breaking the system without a backup... oops. Anyways, our office does not want to spend the money on the professional services, so I combined everything in the same queue and use categories to separate it. 
Answered 10/25/2017 by: cgsao
Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity