Need help with Update Query

hinaahmad5

New member
Local time
Today, 14:16
Joined
Jul 31, 2009
Messages
1
I need to create an update query to update the following table.

Company Code Reserve Amount
1 3150347150
2 12090416405
3 995727962.7
4 33166718680
5 6574236356
6 777642953.3
7 134777278.6
8 9406733.21
9 1300095080
10 16486474.96
11 1635600.41

I want the query to add a Company Code 12 summing the Reserve Amounts for Company Code 1, 5, 6, 7, 8, 9, 10.

Essentially I want the update query to add the following line.
12 11962992026


Any help would be great! Thank you!
 
Hi,

I do not really understand what is the goal but this query would work assuming that Company Code is of type Integer and Reserve Amount is a Double:

INSERT INTO Table1([Company Code], [Reserve Amount])
SELECT 12, SUM([Reserve Amount]) FROM Table1 WHERE [Company Code] IN (1, 5, 6, 7, 8, 9, 10)

Hope that helps,

Simon B.
 

Users who are viewing this thread

Back
Top Bottom