Brian -
LISTOF was added in R:BASE 6.5++ Build 1.851, I believe. If you are running
an earlier version, it won't be available.
The results of LISTOF are:
RiderNum Fname Lname RideMiles
--------------- ----------- ------------ --------------
1 Brian Mowers 30,32.
2 Cathy Mowers 30,32.
8 Gunthe Heurl 30,32.
9 Barb Underwood 30,32.
22 Robert Redford 30,32.
41 Roger Faber 30,32.
48 Terrie Faber 30,32.
It creates a comma-delimited string of all the values in a GROUP By result -
and more - see http://www.rsyntax.com/listof.htm for a complete explanation.
Sami
----- Original Message -----
From: Brian Mowers
To: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 3:01 PM
Subject: Re: More from select distinct (select Group By Rules!)
Sami and Bill,
How are you? The (MAX(RideMiles)) ..etc. worked great!! I guess I was way
off with the 'Distinct' mind set. Thank you very much.
I can use that. However, the 'LISTOF' select gave an error 'Column or
variable LISTOF not found [2515]' You out of the box thinkers are awsome!
What is LISTOF supposted to do any? Just display the column?
Thanks again.
Brian,
At 02:22 PM 12/10/2002 -0600, you wrote:
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/
================================================
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/