Addition in a Query

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

Hi,

I'm trying to set up a query for a particular problem and am a bit
stumped. The data looks like this:

File # $Amount
B67 50
B67 80
B67 70
B68 20
B68 80
B69 90
B69 20
B69 40


I'd like the result to look like this:

File # $Amount
B67 200
B68 100
B69 150

So, another words, a query that would give me a unique File # and add
the $amounts together.

Thanks for any help you can offer.

Jon
 
SELECT [FileNum], Sum([Amount]) As AmtSum
FROM tblYourTable
GROUP BY [FileNum];

Thank you for the help. Unfortunately, it didn't work. I got an error
saying "the Level clause includes a reserved word or argument that is
misspelled or missing, or the punctuation is incorrect".
 
What do you mean by "didn't work"? I am having trouble seeing your results.

Also, please post the SQL view of the query that "didn't work".

--
Duane Hookom
MS Access MVP


Jon said:
SELECT [FileNum], Sum([Amount]) As AmtSum
FROM tblYourTable
GROUP BY [FileNum];

Thank you for the help. Unfortunately, it didn't work. I got an error
saying "the Level clause includes a reserved word or argument that is
misspelled or missing, or the punctuation is incorrect".
 
SELECT [FileNum], Sum([Amount]) As AmtSum
FROM tblYourTable
GROUP BY [FileNum];

Thank you for the help. Unfortunately, it didn't work. I got an error
saying "the Level clause includes a reserved word or argument that is
misspelled or missing, or the punctuation is incorrect".

It worked. I had typed something in wrong. Thanks Duane.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top