I have a situation where I need to update header records based on values in detail records.
In this case there are PO header and detail tables.
The detail table has
I need to do a mass update of the POHEADER.TOTAL field based on the sum of the details lines on the corrresponding PO. So if PO number 1000 has two lines with quantities of 2 and 4 and costs of $50 and $100, respectively. The total cost based on the detail is 2 x 50 and 4 x 100 for a total of $100 + $400 = $500. I need POHEADER.TOTAL to equal $500