Solved

Storing cumulative data

Posted on 2008-10-02
6
229 Views
Last Modified: 2013-11-28
how do you create a "bucket" for numbers and store them in a seperate field in a query?  Example: I have detail records that have data stored in a field called Accural 1which has the following data in detail records:Record 1= .0245, Record 2 = .0358, Recordl 3 = .458.  The bucket or new field would show the total or  .5183 in this example.
0
Comment
Question by:mogurek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 168 total points
ID: 22630680
To get sum, you can just do this:
SELECT SUM([Accrual 1]) AS TotalAccural
FROM yourTableName

Open in new window

0
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 166 total points
ID: 22630683
it is not advisable to store calculated values in a table.

yuo can always get the total value by using sum or dsum functions

in a query assuming you have a recordId and Accural 1 fields

select recordID, sum([Accural 1]) as TotalAccural
group by recordID
0
 
LVL 9

Assisted Solution

by:jamesgu
jamesgu earned 166 total points
ID: 22630688

select Accural_1, (select sum(Accural_1) from table_name) as bucket
from table_name
0
 
LVL 9

Expert Comment

by:jamesgu
ID: 22630701
agree with capricorn1:

if one of the value is changed, the sum value will become incorrect,
or you may have to update the sum value as well.


0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question