|
Best to do this in views in access. i.e. create a query for the sum
select top 5 points from driverpoints where driverid = d.id
then join this with the driver table and run the query from that. It is all possible, just takes a bit of planning and is guaranteed to change once the client sees what is possible.
Ellis C Wood BSc Ellwood Web Solutions
T: 01623 459973 -----Original Message-----
I have a meetings table, a drivers table and a drivers points table. Each driver has points for each meeting. For a series the total points are the best 5 out of 6 scores that a driver has got.
Is it possible to write a query to do this in access?
Something like:
Select sum(select top 5 points from driverpoints where driverid = d.id) as total, driver.drivername From driver d Order by total
I’d test this but I don’t actually have the tables or data yet. I am certain the above won’t work though as you can’t selects with a select statement in access (can you?).
Is there another way of doing this?
Thanks
Giles Roadnight http://giles.roadnight.name |
- [ cf-dev ] Cached query Allan Cliff - CFUG Spain
- RE: [ cf-dev ] Cached query Robertson-Ravo, Neil (RX)
- Re: [cf-dev] RE: [ cf-dev ] Cached quer... Allan Cliff - CFUG Spain
- [ cf-dev ] Compilcated SQL query on... Giles Roadnight
- RE: [ cf-dev ] Compilcated SQL ... Ellwood
- RE: [ cf-dev ] Compilcated... Giles Roadnight
- RE: [ cf-dev ] Compilc... Ellwood
- [ cf-dev ] Flash t... Ellwood
- RE: [ cf-dev ] Fla... Peter Harrison
- RE: [ cf-dev ] Fla... Colm Brazel
- RE: [ cf-dev ] Fla... Colm Brazel
- RE: [ cf-dev ] Com... Giles Roadnight
- RE: [ cf-dev ] Com... Ellwood
- RE: [ cf-dev ] Com... Giles Roadnight
