updating a field with sum of fields in another table
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.
No comments:
Post a Comment