SQL Update With Join


/ Published in: SQL
Save to your folder(s)



Copy this code and paste it in your HTML
  1. UPDATE asset_class_allocations
  2. SET to_date = '2011-07-01'
  3. FROM asset_allocation aa
  4. JOIN options o ON aa.option_uid = o.uid
  5. JOIN product p ON o.product_uid = p.uid
  6. WHERE p.product_id IN (817,617)
  7. AND asset_class_allocations.to_date = '2011-06-30'
  8. AND asset_class_allocations.allocation_uid = aa.uid;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.