Depending on what you want to get from the RideMiles, How's about this:

SELECT RiderNum,Fname,Lname,(MAX(RideMiles)) FROM Rides +
   WHERE GroupNumber = 8 +
  GROUP BY RiderNum,Fname,Lname

or even better,
SELECT RiderNum,Fname,Lname,(LISTOF(RideMiles)) FROM Rides +
   WHERE GroupNumber = 8 +
  GROUP BY RiderNum,Fname,Lname

Sami

-----------------------------------------------------------
Sami Aaron
Software Management Specialists
19312 W 63rd Terr
Shawnee KS  66218
913-915-1971
http://www.softwaremgmt.com


----- Original Message -----
From: Brian Mowers
To: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 11:22 AM
Subject: RE: More from select distinct than I can probably expect but here
goes:


I am scratching my head on this Select Distinct problem.
More from select distinct than I can probably expect but here goes:

Date looks like: (partial data, thousands of rows) (TABLE NAME :RIDES)

RiderNum        Fname   Lname       RideMiles              RideDate
GroupNumber
------------    -----------     --------------------    --------------  ----
------------
          1     Brian   Mowers          30.             10/21/2002      8
          1     Brian   Mowers          32.             11/24/2002      8
          2     Cathy   Mowers          30.             10/21/2002      8
          2     Cathy   Mowers          32.             11/24/2002      8
          8     Gunthe  Heurl           30.             10/21/2002      8
          8     Gunthe  Heurl           32.             11/24/2002      8
          9     Barb    Underwood       30.             10/21/2002      8
          9     Barb    Underwood       32.             11/24/2002      8
         22     Robert  Redford         30.             10/21/2002      8
         22     Robert  Redford         32.             11/24/2002      8
         41     Roger   Faber           30.             10/21/2002      8
         41     Roger   Faber           32.             11/24/2002      8
         48     Terrie  Faber           30.             10/21/2002        8
         48     Terrie  Faber           32.             11/24/2002        8

Want distinct Fname,Lname From Rides Where GroupNumber=8
 However, I want to include the RideMiles as part of this select.
If I put the RideMiles into the select (below) it breaks the discinctness
that I am looking for. Is this possible?

This is what I want:
RiderNum        Fname   Lname           RideMiles
--------------- ----------- ------------        --------------
          1     Brian   Mowers          32.
          2     Cathy   Mowers          32.
          8     Gunthe  Heurl           32.
          9     Barb    Underwood       32.
         22     Robert  Redford         32.
         41     Roger   Faber           32.
         48     Terrie  Faber           32.
Any insight appreciated.
Thanks,
Brian Mowers

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to