Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Question Unanswered: couter in Access (Solved) thx DoktorBlue

    Does some1 knows how i cal do this in Access

    i have a table with :
    NAME

    John
    John
    John
    John
    Mark
    Mark
    Mark
    Bill
    Bill

    now i want 2 make a query with the folowing columns
    TIMES NAME
    1 John
    2 John
    3 John
    4 John
    1 Mark
    2 Mark
    3 Mark
    1 Bill
    2 Bill

    i know i can make a count bill and it will return 2, but i have 2 count how much time bill has a connection with a relation, so infact i want first second ect. and then start counting over again. And it has 2 be in a query and NOT in a report. because i have 2 use the result in a next query


    Much Obliged
    Last edited by Marvels; 08-26-03 at 08:04.

  2. #2
    Join Date
    May 2003
    Location
    Costa Rica
    Posts
    40
    Try with recordset moving around with .movefirst, movenext, etc.

  3. #3
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    NOT what im looking 4

    I want to make a query that will return the specified outcome:


    Counter | Name

    1 Bill
    2 Bill
    3 Bill
    4 Bill
    1 John
    2 John
    3 John
    1 Max
    2 Max

    I know this is possible in SQLServer i wonderd if it is possible in Access to

  4. #4
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447

    Re: NOT what im looking 4

    You need a separate table T, containing one field F with the numbers 1, 2, 3, ....

    Furthermore, you need a query Q on your table, grouping your Name and determining the count

    Then, you get your result

    SELECT T.F, Q.Name
    FROM T, Q
    WHERE T.F <= Q.Count
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

Posting Permissions

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