• JoNTSQLSrv - Wednesday, February 14, 2018 10:13 AM

    HI guys, 
      I need expects advice to do below things with great performance. 

       A Table has 10 million ID's records. My task is to generate .xml file so  that 1 xml file should has 1000 ID information. I have done xml out for  1 ID  using for xml clause
     1.   I want advice on how to  generate it as  .XML file with specific name - name to be pick from table .
     2.   I want to know how to split whole 10 million ID to 10,000 XML file with each xml having 1000 ID information in it. 

    Please give me idea , how to do it ?

    Thanks in advance

    Do the people that made that request actually understand that 1) it will expand the amount of space required by somewhere between 8 and 16 times and 2) that 10 million divided by 1000 means that there will be 10,000 files filled with XML junk and 3) there are much more effective methods for transferring such large numbers of rows?

    With that, I have to ask, what is the business reason behind this request?  What is the ultimate goal and what kind of system will receive the data?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)