Update Query Help
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
Answers (2)
Please log in to answer
Posted by:
airwolf
7 years ago
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.
Posted by:
cgsao
7 years ago