daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Dec 16th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT sku, size, color, product_code,
  2.   sku_config = CASE
  3.     WHEN sku = 'parent' THEN 'sku=' + product_code + '_'
  4.       + STUFF((SELECT sku_config = '|' + sku
  5.                FROM dbo.Products AS pi
  6.                WHERE pi.product_code = p.product_code
  7.                AND sku <> 'parent'
  8.                FOR XML PATH(''), TYPE).value(N'.[1]','nvarchar(max)'),1,1,'')
  9.     ELSE '' END
  10. FROM dbo.Products AS p;
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