Guest User

Untitled

a guest
Jul 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. update table_A
  2. set column_A = case when column_A>table_B.balance then value else column_A end,
  3. column_B = case when not (column_A>table_B.balance)
  4. and (column_B>table_B.balance) then value else column_B end,
  5. column_C = case when not (column_A>table_B.balance)
  6. and not (column_A>table_B.balance)
  7. and (column_C>table_B.balance) then value else column_C end
  8. from table_B
  9. on table_A.Id=table_B.id
Add Comment
Please, Sign In to add comment