nick2price
Registered User.
- Local time
- Today, 09:07
- Joined
- Sep 24, 2008
- Messages
- 14
I have a database with the relationships as so:
I am trying to create a query which will return the top 3 fastest times for the 100M Run for Round 1. This is what i have attempted, please egnore the syntax and everything as it is written for java.
Please can you advise me how to get it correct,
cheers
I am trying to create a query which will return the top 3 fastest times for the 100M Run for Round 1. This is what i have attempted, please egnore the syntax and everything as it is written for java.
Code:
String SELECT_TOP_TIMES =
"select r.result " +
"from tblResults as r " +
"where r.Event_ID = " +
"(select e.ID " +
"from tblEvent as e " +
"where e.Event_Name = ?) " +
"where r.Round_ID = " +
"(select ro.ID " +
"from tblRound as ro " +
"where ro.Round_Number = ?) " +
"order by r.result ";
Please can you advise me how to get it correct,
cheers
Last edited: