Access, Update Query

Associate
Joined
21 May 2006
Posts
327
Hello,

I have a SELECT query which is sum'ing a number of fields within my database. I then want to create a UPDATE query which will populate another field within the row with the calculated values.

I have tried this however keep getting an error stating that its not possible.

Can you advise how I can sum a number of fields within a row and update a seperate field with the values. Not sure if I will need to create temporary tables, and if so how do I do this.

Hope that above makes sense however please let me know if you require any further information.

Regards,

J
 
Try this:

Code:
update table_name
set column_name = (select sum(column_name) from table_name where x = y)
where a = b
 
Back
Top Bottom