• sarwaanmca (12/28/2012)

    I am already tried following Method..

    select * from xmldata FOR XML AUTO

    select * from xmldata FOR XML AUTO, ELEMENTS

    SELECT * FROM xmldata FOR XML PATH('Root')

    select * from xmldata FOR XML RAW('Node')

    But still i Didn't get Exact File Structure...

    (Above Mentioned File Structure The Parent / Child hierarchy Should be Must)

    Any One Try this...ASAP...

    Thanks & Regards,

    Saravanan.D

    Some good questions have been raised concerning the data structure, so I won't address that. Assuming you eventually get the data output the way you need it you will still face the XML formatting nightmare. I'll offer some links that give specific examples for producing various forms of XML output:

    http://www.sqlservercentral.com/Forums/Topic1361033-392-3.aspx#bm1375776

    http://www.sqlservercentral.com/Forums/Topic1344161-391-1.aspx#bm1345086

    http://www.sqlservercentral.com/Forums/Topic1395950-1292-1.aspx#bm1397564

    I hope these examples will help you.