I'm trying to create a balance table of customers' currencies
Each customer has 2 currencies with different amounts
e.g.
Customer A | USD | 100
Customer A | HKD | 800
Customer B | USD | 100
...
When there is a transaction (e.g. Customer A receives 50 USD), it creates a new record of balance instead of updating the existing one.
Customer A | USD | 50 (New record)
Customer A | USD |100
How can I update the record according to the customer and the currency to achieve the following outcome?
Customer A | USD | 150 (Update the existing record)
Many thanks!!!
Hi Wong,
Try to execute this logic.
Regards,
Riyas
you need to query the database before inserting any new record.
Regards
Thank you @Muhammed Riyas and @José Gonçalves!!! It works!!!