SHARE
TWEET

Untitled

a guest Feb 19th, 2019 124 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MERGE INTO vws_art_alert
  2. USING (
  3.    SELECT rin_date_unreg, rin_per_id
  4.    FROM vwe_cpr_info
  5.    WHERE rin_date_unreg >= '27-SEP-11'
  6.    AND rin_date_unreg <= '13-JAN-12')
  7. ON (vws_art_alert.art_per_id = vwe_cpr_info.rin_per_id
  8.     AND art_alert = 'AL02'
  9.     AND art_inactive_on IS NULL)
  10. WHEN MATCHED THEN  
  11. UPDATE SET vws_art_alert.art_inactive_on = vwe_cpr_info.rin_date_unreg;
  12.    
  13. MERGE INTO vws_art_alert
  14. USING (
  15.    SELECT rin_date_unreg, rin_per_id
  16.    FROM vwe_cpr_info
  17.    WHERE rin_date_unreg >= '27-SEP-11'
  18.    AND rin_date_unreg <= '13-JAN-12') t
  19. ON (vws_art_alert.art_per_id = vwe_cpr_info.rin_per_id
  20.     AND art_alert = 'AL02'
  21.     AND art_inactive_on IS NULL)
  22. WHEN MATCHED THEN  
  23. UPDATE SET vws_art_alert.art_inactive_on = t.rin_date_unreg;
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