crewchiefpro6
Programmer
I thought I had this figured out but apparently not.
I have a table that has the following structure.
RaceSession C
DriverName C
CarNumber C
ElapsedTime N
DialIn N
This file holds an entire race weekend of runs, with Each Driver getting 3 qualifying runs. I need to determine the qualifying position based on the best run for each driver throughout the entire 3 run qualifying sessions.
For Example:
RaceSession = 1 CarNumber= 389A DriverName="Berch" ElapsedTime= 8.844 DialIn= 8.900
RaceSession = 1 CarNumber= 3A DriverName="Derch" ElapsedTime= 8.918 DialIn= 8.900
RaceSession = 1 CarNumber= 367B DriverName="Rierch" ElapsedTime= 8.944 DialIn= 8.900
This would be repeated for RaceSession #2 and #3 also but with different ElapsedTime information.
What is important to determine is WHO is closest to their DialIn time WITHOUT going under it.
Then I built a where clause from a SimpleList OLE (thanks Mike) that the user clicks each qualifying session they want to include in the results.
Soooooo, I created the SQL and where clause that looks something like this
select top 150 racesession, carnumber, drivername, ElapsedTime, DialIn ;
from iCard ;
where racesession = "SUPER COMP T1" and "racesession = "SUPER COMP T2" and "racesession = "SUPER COMP T3" and ElapsedTime >= DialIn ;
order by ElapsedTime ;
group by carnumber
This only works if there is only ONE racesession selected.
If I cannot find another way to do this could I create a seperate cursor from each session and then join the results to see only one driver's best time?
Hope this is not to long. If I could find a way to post the dbf file and a small prg I would.
Don
Don Higgins
I have a table that has the following structure.
RaceSession C
DriverName C
CarNumber C
ElapsedTime N
DialIn N
This file holds an entire race weekend of runs, with Each Driver getting 3 qualifying runs. I need to determine the qualifying position based on the best run for each driver throughout the entire 3 run qualifying sessions.
For Example:
RaceSession = 1 CarNumber= 389A DriverName="Berch" ElapsedTime= 8.844 DialIn= 8.900
RaceSession = 1 CarNumber= 3A DriverName="Derch" ElapsedTime= 8.918 DialIn= 8.900
RaceSession = 1 CarNumber= 367B DriverName="Rierch" ElapsedTime= 8.944 DialIn= 8.900
This would be repeated for RaceSession #2 and #3 also but with different ElapsedTime information.
What is important to determine is WHO is closest to their DialIn time WITHOUT going under it.
Then I built a where clause from a SimpleList OLE (thanks Mike) that the user clicks each qualifying session they want to include in the results.
Soooooo, I created the SQL and where clause that looks something like this
select top 150 racesession, carnumber, drivername, ElapsedTime, DialIn ;
from iCard ;
where racesession = "SUPER COMP T1" and "racesession = "SUPER COMP T2" and "racesession = "SUPER COMP T3" and ElapsedTime >= DialIn ;
order by ElapsedTime ;
group by carnumber
This only works if there is only ONE racesession selected.
If I cannot find another way to do this could I create a seperate cursor from each session and then join the results to see only one driver's best time?
Hope this is not to long. If I could find a way to post the dbf file and a small prg I would.
Don
Don Higgins