I need to update one table with the sum of values in another table, eg

set PaymentSummary.TotalCash to the sum of PaymentLine.Cash where both tables contain the same PayentRef column

I think I need to do this with a JOIN of some type, but I'm not sure which

anyone got any ideas....