Advertisement
srossini

Untitled

Mar 24th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. select product.name,product.shortdescription, product.codigoeanunidade,product.procodigo,
  2. categories = STUFF((
  3. SELECT ', ' + c.name FROM category c
  4. inner join product_category_mapping pcm on c.id = pcm.categoryid
  5. WHERE pcm.productid = product.id
  6. and c.name <> 'Pesquisa'
  7. and c.parentcategoryid <> 13483
  8. FOR XML PATH(''), TYPE).value('.[1]', 'nvarchar(max)'), 1, 2, '')
  9. from product product
  10. where product.published = 1
  11. and product.filcodigo = 1
  12. for xml auto
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement