Im trying to write a formula in SQL Server to subtract the values of two columns which are [AmountSpent]column of table2 and [Amount] column of table1of two different tables and update the balance amount in [Amount] column any idea ?
Thank you in advance…
I think the following will work, assuming you have a reliable foreign key relationship between the two tables