0

can someone help me to write a query that will sum the information across the row and down the column (sum) in ms access table
a b sum
1 10 11
2 20 22
total_all
I tried the following
select a,b, sum as (a+b) from table1
the error i get :
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.

3
Contributors
3
Replies
5
Views
6 Years
Discussion Span
Last Post by Josef01
0

the correct statement is:

SELECT a, b, sum(a + b) from table1

sum is an existing method that returns the sum of the passed items

0

the statement used to produce required output is:-

SELECT a,b,a+b as sum from table1

to get the result across the column i.e. sum of all columns:-

select sum(a),sum(b),sum(a+b) from table1

hope it might be helpful.....

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.