Need Help parsing through the XML

  • Jeff Moden (7/24/2014)


    I wasn't looking at it that way. I was looking at sending a much larger volume of rows that might justify a form of "poor man's replication".

    Ah, that makes more sense. No, definitely not for that. It's for specific use cases. If I could send @Table parameters into a foreign database I wouldn't use the XML except for output to external sources. Glad I asked for clarification. 🙂


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Evil Kraig F (7/25/2014)


    Glad I asked for clarification. 🙂

    Me to. And fully agreed on the cross server use of table variables. It could really cut down on the I/O and CPU overhead on a system that does possible hundreds of these things per second.

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

  • I did not go though all the replies but am throwing this out there.

    I had to do the same thing a few years ago and here is how I did it (was processing over a million records straight from a table to an xml file using ssis)...

    DECLARE @XmlOutput xml

    SET @XmlOutput =

    (

    select RecordType "Participant/recordtype",

    ProfileID "Participant/accountnumber"

    from dbo.Table

    where 1=1

    and Report_Year = @Report_Year

    and Report_Month = @Report_Month

    for xml path(''),

    root('PutRootHere')

    )

    SELECT @XmlOutput

Viewing 3 posts - 31 through 32 (of 32 total)

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