i need help in updating a balance column in table. using update command
The balance column in present in customer_master
customer_master > custcode,balance
It needs to be updated on the basis of values in two tables
Bookings > custcode, bookingamount
Receivables > custcode, amountrecd
for a customercode, the Balance is bookingamount – amountrecd
The command is to be applied in mysql and postgresql.
It can be for a single customer like (for custcode =’A1234XXXXX’) and also may be applied for all customers present in customer_master.
I tried Google on ‘Updating balance from two tables’ but with no luck so far.
thanks
my take which is sort of (possibly) over the top belt and braces