• kevaburg - Saturday, April 29, 2017 11:19 AM

    So, I have altered the BCP export to include elements and the root element:

    bcp"select dbname from dbo.tbl_databasesizes order by dbname asc for xml auto, elements, root('DBList')"
    queryout "c:\Backups\test.xml"
    -T -S.
    -dutilitydb
    -w -k
    -ec:\Backups\test_errors.txt"

     I can now Create a new XML Mapping object (see attachment) but now don't know what to do with it.... 🙁

    Maybe "merge fields" in Word?  You'd have a "template" where it would do the merge as soon as the document opened in an "auto-update" fashion.

    Shifting gears a bit, why "Word"?  Are you trying to create some form of server documentation?

    --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)