Results 1 to 2 of 2

Thread: SQL summation

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 1999
    Posts
    42

    Post

    Is it possible to create cumulative values in an access table using a query. The problem is:
    Period Value CumulativeValue
    1 100 100
    2 50 150
    3 100 350
    and so on.
    Any ideas appreciated

  2. #2
    Member
    Join Date
    Jan 1999
    Location
    Longmont,CO
    Posts
    53

    Post

    Yes you can return the cumulative value with an SQL query. It's something like this:

    sSQL = SELECT Period, Value, SUM([Value]) As CumulativeValue, FROM Tablename

    This will return your 2 columns and a third named 'CumulativeValue', which will be the sum of all of the 'Value' entries.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width