Update SQL
The update below sets a ticket owner ok, now I need to add also Ticket CC_List person to it and I don't seem have success.
I would appreciate your help.
update HD_TICKET, USER as T5
set HD_TICKET.OWNER_ID = T5.ID and
where T5.FULL_NAME = 'xxxxxxx' and
(HD_TICKET.ID in (<TICKET_IDS>))
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
chucksteel
6 years ago
Your syntax needs some work and I'm not sure how that update statement is functioning correctly. This statement should update the ticket owner and add a static user to the CC list.
update HD_TICKET, USER as OWNER
set HD_TICKET.OWNER_ID = OWNER.ID, HD_TICKET.CC_LIST = "email@address.com"
WHERE OWNER.FULL_NAME = 'xxxxx'
and HD_TICKET.ID in (<TICKET_IDS>)
Note that this will replace any values in the CC_LIST field with just this value. I also changed the alias on the USER table from T5 to OWNER to make it more clear.