Summing up items in XML field

  • Hi

    Looking to sum "Monthly_x0020_Income_x0020_Amount" in the XML field below

    In this example there is only one , sometimes more than one...

    Thanks

    Data>...

    <Income_x0020_Source_x0020_Amount>

    <ST2>

    <Monthly_x0020_Income_x0020_Amount>547</Monthly_x0020_Income_x0020_Amount>

    </ST2>

    </Income_x0020_Source_x0020_Amount>

    <non_x0020_cash_x0020_ST>

  • Hi

    This seems to work...

    data.value('sum(/Data/Income_x0020_Source_x0020_Amount/ST2/Monthly_x0020_Income_x0020_Amount)', 'float') as OtherIncome

    Thanks

  • That's the phenomenon where you come up with the answer shortly after posting the question 🙂

    Thanks for posting back how you got it working.

    Sue

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

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