/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: chucksteel 6 years ago
Red Belt
2
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.

Posted by: aoh 6 years ago
Senior Yellow Belt
1
Thank you Chuck. I will try it.

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