Skip to content

Instantly share code, notes, and snippets.

@edersqo
Last active April 11, 2018 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edersqo/f232a1ec47e897ef61f54ca737e7ca46 to your computer and use it in GitHub Desktop.
Save edersqo/f232a1ec47e897ef61f54ca737e7ca46 to your computer and use it in GitHub Desktop.
Compare CATA, and CATB Versions
-- Compare VERSION column, CATA vs CATB
SELECT
COALESCE(CATA.PRICE_ID, CATB.PRICE_ID) AS PRICE_ID,
CASE
WHEN CATA.VERSION = CATB.VERSION THEN 'Equal'
WHEN CATA.VERSION <> CATB.VERSION THEN 'Changed'
END AS STATUS,
CATA.VERSION AS CATA_VERSION,
CATB.VERSION AS CATB_VERSION
FROM
WLM_PROD_CATA.DCS_PRICE CATA FULL JOIN WLM_PROD_CATB.DCS_PRICE CATB
ON CATA.PRICE_ID = CATB.PRICE_ID;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment