xml query

  • Hi All

    I am trying to create xml from table

    for that i used query

    select column1,column2,column3 from table1 FOR XML PATH('')

    This will give xml output

    1xxxABC

    My desired output should be like given below

    <[/b]column2>xxx

    ABC

    Suggest me how will i arrive to this output through SQL Query and XML commands

    awating reply asap

  • select column1,column2 as "SUBTAG/column2" ,column3 from table1 FOR XML PATH('')

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537

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

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