Skip to content

Instantly share code, notes, and snippets.

@carl-parrish
Last active August 29, 2015 14:03
Show Gist options
  • Save carl-parrish/01b2843fe4a989b2c6dd to your computer and use it in GitHub Desktop.
Save carl-parrish/01b2843fe4a989b2c6dd to your computer and use it in GitHub Desktop.
MERGE INTO mp_users_plans Data
USING bckup_mp_usr_plan Source
ON Data.id = Source.id
AND Source.date < ‘<today>’ AND thm_order_id != ‘0'
WHEN MATCHED THEN
UPDATE
SET thm_order_id = Source.thm_order_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment