+ Reply to Thread
Results 1 to 4 of 4

Running Count Query

  1. #1
    Registered User
    Join Date
    02-21-2008
    Posts
    21

    Running Count Query

    I need help with a Running Count Query.
    Lets say i have one column,

    X
    X
    X
    T
    T
    E
    E
    E
    E
    E

    i want to make a query that adds a running count column, like the one below

    X ,1
    X ,2
    X ,3
    T ,1
    T ,2
    E ,1
    E ,2
    E ,3
    E ,4
    E ,5

    Does anyone know how to do this? any help is GREATLY appreciated.

  2. #2
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717

    Re: Running Count Query

    Suppose ur data is in Column A.

    In B1 you type 1 ( which is next to first X )

    in B2 type
    Please Login or Register  to view this content.
    and drag it down

  3. #3
    Registered User
    Join Date
    02-21-2008
    Posts
    21

    Re: Running Count Query

    Quote Originally Posted by Shijesh Kumar View Post
    Suppose ur data is in Column A.

    In B1 you type 1 ( which is next to first X )

    in B2 type
    Please Login or Register  to view this content.
    and drag it down
    Im sorry.. i'm using Microsoft Access.. so i can't do what you mentioned

  4. #4
    Registered User
    Join Date
    03-20-2008
    Location
    Buffalo, NY USA
    Posts
    43

    Re: Running Count Query

    You can do it using a subquery, but you'll need an ID field (autonumber) to pull it off. Here is the syntax:

    Please Login or Register  to view this content.
    myField is your field name
    mytable is your table name
    ID is the autonumber field

    Brent

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1