Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unique Values (A2K SR1)

    I have a select query based on tblRental that selects records based on a date. It is possible to
    return multiple records for the same [RoomNumber]. I want to be able to exclude all but the first
    record for each [RoomNumber].

    I was trying to use SELECT DISTINCT tblRental.RoomNumber FROM tbl.rental

    The existing SQL begins SELECT DISTINCT tblRental.OrderID, tblRental.RoomNumber, etc

    Can you add some type of

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Unique Values (A2K SR1)

    Make the query into a Totals query. The Totals line will read Group By for all fields by default. Leave it that way for RoomNumber, but set it to First for the other fields.

Posting Permissions

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