I'm having great difficulty in finding how to do this. I've been searching for hours but can't come up with a working solution.
I have two tables.
TableA - Code, TranDate, Amount
TableB - Code Amount
I wish to Update TableB Amount by deducting the sum of Amount in TableA (where a.code = b.code and a.TranDate > 'A GIVEN DATE'
I have to confess to having limited ability with SQL. I am using SQL server 2005.