SHARE
TWEET

Untitled

a guest Aug 19th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UPDATE TABLE1 A
  2. SET A.COL1= (SELECT DISTINCT B.COL1 FROM TABLE2 B WHERE B.ID= A.ID AND B.DeptID=104)
  3. WHERE A.DeptID=3
  4.      
  5. UPDATE TABLE1 A
  6. SET A.COL1 = B.COL1
  7. FROM TABLE2 B
  8. WHERE
  9. A.ID = B.ID AND
  10. A.DeptID = 3 AND
  11. B.DeptID = 104;
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