Generate XML File

  • Hi i need to generate a XML file like this

    <Products>

    <product>item1</product>

    <product>item2</product>

    <product>item3</product>

    <product>item4</product>

    <product>item5</product>

    </Products>

    i have this query

    select Product

    from Products

    where category= 1

    i try to use FOR XML AUTO or FOR XML PATH and i don't have the xml what i needed ...

    any suggest ?

  • i'm find the solution, i need to use FOR XML PATH('')

    😉

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply