How can I add two columns (amount, amount2) if they have the same value in multiple columns (Account,Account2) using UPDATE statement. I want to keep all rows even if Account <> Account 2. Also i want them in two columsn only Account and Amount. I am using MS Access sql view. * I want to update the table not just use a select statement*
For example: I want to add Amount and Amount2 columns only if Account, Account 2 columns match.
I want that result end to be only two columns, the Account and the amount that was added together.
Account Amount Account2 Amount2
1234576 4 1234576 4
4444444 10 4564888 11
456789 2 456789 2
000000 1 1111111 6