Sum and Update tables in access sql query?

127 Views Asked by At

I m trying to sum a column of a certain criteria in a table and update these values to another table. here is what i have so far

UPDATE table2 SET table2.column2 = (SELECT Sum([oldtable].values) AS sumvalues 
FROM [oldtable] 
WHERE ((([oldtable].types)= category1 )) 
); 

so im trying to get the Sum of the values in the values column of "oldtable" where the criteria in the types column is category1

but i get this error when i execute this code "Operation must use updatable query"

0

There are 0 best solutions below