G
Guest
Alright well I have this query I'm trying to run. Basically what I want to do is add up all the values of a column for which a statement is true and then update the sum to another field. Here is the query I'm trying to run
UPDATE 1234
SET [Hours On Seal Total] = Sum([hours on seal]
WHERE [Seal Number]=1
I want to set the field "hours on seal total" to be the sum of all the "hours on seal" fields for which the seal number is "1". I get this error:"You tried to execute a query that does not include the specified expression 'hours on seal total' as a part of an aggregate function". And it won't run
I can run it as a select statement
SELEC
SUM([hours on seal]
FROM 123
WHERE [Seal Number]=
And it returns the correct answer. What I need is for it to write that answer to a field in a table. HELP!?
UPDATE 1234
SET [Hours On Seal Total] = Sum([hours on seal]
WHERE [Seal Number]=1
I want to set the field "hours on seal total" to be the sum of all the "hours on seal" fields for which the seal number is "1". I get this error:"You tried to execute a query that does not include the specified expression 'hours on seal total' as a part of an aggregate function". And it won't run
I can run it as a select statement
SELEC
SUM([hours on seal]
FROM 123
WHERE [Seal Number]=
And it returns the correct answer. What I need is for it to write that answer to a field in a table. HELP!?