How to generate cutomised xml using sql stored procedure

  • Hi All...

    I ran into problem where i have to make cutomised xml using sql stored procedure

    ..i have two tables from where i am trying to making xml of format

    "

    "

    i am using query as ...

    head.a,head.b,item.c,item.d,ROW_NUMBER() OVER ( PARTITION BY Head.a ORDER BY Head.a) as Row from head inner join item

    where head.a = item.a for xml auto,elements

    but i am not getting the xml as required..could anyone help me out...

    Thanks

    Sandeep

  • [font="Verdana"]Refer FOR XML clause in BOL for more information.

    By the way, post your complete select statement and the exact problem as well.

    Mahesh[/font]

    MH-09-AM-8694

  • Hi All...

    I ran into problem where i have to make cutomised xml using sql stored procedure

    ..i have two tables from where i am trying to making xml of format

    (head)

    (a) (/a)

    (b) (/b)

    (/head)

    (item)

    (c) (/c)

    (d) (/d)

    (/item)

    (item)

    (c) (/c)

    (d) (/d)

    (/item)

    i am using query as ...

    head.a,head.b,item.c,item.d,ROW_NUMBER() OVER ( PARTITION BY Head.a ORDER BY Head.a) as Row from head inner join item

    where head.a = item.a for xml auto,elements

    but i am not getting the xml as required..could anyone help me out...

    Thanks

    Sandeep

Viewing 4 posts - 1 through 3 (of 3 total)

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