SHARE
TWEET

Untitled

a guest Dec 6th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DECLARE @role varchar(20)
  2.    select @role = u.[role] from inserted i join users u on u.id = i.creator_id
  3.  
  4.    if @role = 'client'
  5.           update TableA
  6.           set updated_date = i.created_date from inserted i where TableA.id = i.trans_id
  7.  
  8.    if @role = 'tech'
  9.           update ticket
  10.           set updated_date = i.created_date from inserted i where TableA.id = i.trans_id and i.[public] = 'true'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top