Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2003
    Posts
    21

    Unanswered: A sequential number

    Hello all,
    I wonder how one can get the number of record along with the other data fields returned from the query, more specifically how to get this using SQL?

    i.e. the results should look as follows (not the first seq. number) :
    1 John 1976 3000
    2 Michael 7965 5000
    3 George 1980 3500
    .. an so on


    Thanks in advance

  2. #2
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Re: A sequential number

    Originally posted by waleedfi
    Hello all,
    I wonder how one can get the number of record along with the other data fields returned from the query, more specifically how to get this using SQL?

    i.e. the results should look as follows (not the first seq. number) :
    1 John 1976 3000
    2 Michael 7965 5000
    3 George 1980 3500
    .. an so on


    Thanks in advance
    ud say
    select number_field
    ,Name
    , phone_number
    from user_table
    group by number_field
    ,Name
    , phone_number
    order by number_field

    thats the syntax ud need

  3. #3
    Join Date
    Apr 2003
    Posts
    21
    I'm sorry but that didn't work, it just returned the selected fields without a sequential number at the beginning.

    thanks for your help anyway...

  4. #4
    Join Date
    Mar 2003
    Location
    London
    Posts
    40

    Re: A sequential number

    In case you're running a pass-through query on an Oracle database you can use ROWNUM pseudo-field to return sequentials.

    I am not aware of any equivalent in Access.

Posting Permissions

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