ZedtheHead
No clue about Access user
- Local time
- Today, 04:05
- Joined
- Jan 11, 2005
- Messages
- 15
I can't seem to be able to get the SQL right for this query.
I have two tables, TableCustomers and TableRates. Both tables have CHARGES and RATES fields. I also have a form which updates the CHARGES in the TableRates table. After these changes, an update query is run that should update the CHARGES field of the TableCustomers table depending on the value of RATES in TableCustomers. So if a record in TableCustomers has a value of 3 in its RATES field, the value of its CHARGES field is updated to the value of the CHARGES field in TableRates whose RATES field is also 3.
I've got this far:
but haven't been able to get the condition right. I'm not even sure if what I've got so far is right.
Can anyone help me out on this?
I have two tables, TableCustomers and TableRates. Both tables have CHARGES and RATES fields. I also have a form which updates the CHARGES in the TableRates table. After these changes, an update query is run that should update the CHARGES field of the TableCustomers table depending on the value of RATES in TableCustomers. So if a record in TableCustomers has a value of 3 in its RATES field, the value of its CHARGES field is updated to the value of the CHARGES field in TableRates whose RATES field is also 3.
I've got this far:
Code:
UPDATE TableCustomers
SET TableCustomers.CHARGES = TableRates.CHARGES
WHERE ??????;
but haven't been able to get the condition right. I'm not even sure if what I've got so far is right.
Can anyone help me out on this?