Quantcast
Channel: FOR XML PATH QUESTION
Viewing all articles
Browse latest Browse all 3

FOR XML PATH QUESTION

$
0
0

Hi all,

The following code

Select 'Pizza' as "@Item",
'Pepperoni' as "ingredient",
'Sausage' as "ingredient",
'Mushrooms' as "ingredient"
for XML PATH

Yields

<row Item="Pizza">
  <ingredient>PepperoniSausageMushrooms</ingredient>
</row>

How do i construct my query to return

<row Item="Pizza">
  <ingredient>Pepperoni</ingredient>
  <ingredient>Sausage</ingredient>
  <ingredient>Mushrooms</ingredient>
</row>

 

Obviously I could use different element names, but I need them to be the same.

Any ideas?

Thanks


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images