Hi folks,
Can you help a SQL newbie with nested Update statements?
I have a table – lets call it Table 1, with a PK of a client identification Number (Table1.Cust_Id)
Table 1 Joins to Table 2 against a £Balance field which can show + or – balances (e.g.£10.00 or -£10.00) – there are many values in the £Balance field to the single Cust_Id. I have put CustId and all balances (with other identifying info) into a third Table – Table 3.
I’ve added a couple of fields CR_BAL and DB_Bal to Table 1. What I want to do without creating more tables and updating from them
is a sum of the aggregate Credit balances and Debit Balances from Table3 against the Cust_Id into the CR_Balance/Deb_Balance Fields.
Is there a nested way I can write this without creating and dropping temporary count tables?
thankeeeee!
Blitzy