Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.72 KB | None | 0 0
  1. SELECT DISTINCT * EXCEPT(CMS_STATUS),
  2.     CASE
  3.     WHEN CMS_STATUS LIKE "%Published in another Document%" THEN "Published in another Document"
  4.     WHEN CMS_STATUS LIKE "%Published%" THEN "Published"
  5.     WHEN CMS_STATUS LIKE "%Product out of stock%" THEN "Product out of stock"
  6.     WHEN OFF_CMS = "True" THEN "Off CMS"
  7.     WHEN CMS_STATUS LIKE "%Document not active%" THEN "Document not active"
  8.     ELSE "Offer or Product information missing"
  9.     END AS CMS_STATUS
  10. FROM
  11.     (SELECT
  12.         Country AS PAYS,
  13.         CONCAT(Codedoc, Yyear) AS SUPPORT_DE_VENTE,
  14.         Productid AS PRODUCT_ID,
  15.         CMS_On_Off AS OFF_CMS,
  16.         Productreasonnotpublished AS CMS_STATUS
  17.     FROM
  18.         `datapipeline-redoute.CMS.OFFRES_DAY`)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement