Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --update table t_ou
- UPDATE t_ou
- SET ou_name = CONCAT(ou_code, ' - ', ou_name), update_datetime = vCurrentDate, update_user_id = vUserId, version+1
- WHERE tenant_id = vTenantId
- --update table i_outlet
- UPDATE i_outlet X
- SET outlet_name = CONCAT(A.ou_code, ' - ', outlet_name), update_datetime = vCurrentDate, update_user_id = vUserId, version+1
- FROM t_ou A
- WHERE X.tenant_id = vTenantId
- AND X.ou_id = A.ou_id
- AND X.tenant_id = A.tenant_id
Advertisement
Add Comment
Please, Sign In to add comment