![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
You need an aggregate query: SELECT Sum(Field2), Sum(Field3) FROM yourtable GROUP BY Field1 In the query designer, click on the Summation key. All fields will default to the GROUP BY clause. Change it to the SUM function for your numeric fields. That will create the SQL you are looking for. You don't need any nesting. |
#3
| |||
| |||
|
|
"Ed J." <ed (AT) smbpartners (DOT) com> wrote in message news:939e1fca-0bb2-4c02-94c4- You need an aggregate query: SELECT Sum(Field2), Sum(Field3) FROM yourtable GROUP BY Field1 In the query designer, click on the Summation key. All fields will default to the GROUP BY clause. Change it to the SUM function for your numeric fields. That will create the SQL you are looking for. You don't need any nesting. Thanks I should have added that the select query is already set up as an aggregate. Problem is I've got various other fields using Group By and I can't change those to SUM. |
#4
| |||
| |||
|
|
buckskin wrote: "Ed J." <ed (AT) smbpartners (DOT) com> wrote in message news:939e1fca-0bb2-4c02-94c4- You need an aggregate query: SELECT Sum(Field2), Sum(Field3) FROM yourtable GROUP BY Field1 In the query designer, click on the Summation key. All fields will default to the GROUP BY clause. Change it to the SUM function for your numeric fields. That will create the SQL you are looking for. You don't need any nesting. Thanks I should have added that the select query is already set up as an aggregate. Problem is I've got various other fields using Group By and I can't change those to SUM. You're going to have to show us some sample data that truly illustrates your problem. Cut it down to the minimum needed to show your problem. Obviously you did a little too much cutting in your first attempt. |
![]() |
| Thread Tools | |
| Display Modes | |
| |