Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
threedoglegs
Starting Member
2 Posts |
Posted - 2005-09-24 : 20:01:27
|
I have developed a horse racing ratings database program in ms access 2002 and need to determine races in which my top 3 picks have all finished in any order in the top 3 placings ie: 1st, 2nd or 3rd.I have 3 linked tables Meeting - Date, Course, Track Cond etc Race - Race#, RaceName, Dist, Class, Time etc Field - Horse#, HorseName, Jockey, Trainer, WGT, CAR, MGN, FIN, SEL etcDenis |
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-09-25 : 06:26:03
|
Is this homework?And how are the tables related ? |
 |
|
threedoglegs
Starting Member
2 Posts |
Posted - 2005-09-25 : 06:51:01
|
All Hail Yak KnowledgeNo - not homework !!This is the result of 10 yrs hard work as a hobby.The links are "One to Many" with cascading updates and enforced referential integrityTable Meeting DATE COURSE etc ID_COURSE (PRIMARY)Table Race RACE_NO RACE_NAME etc ID_MEET (SECONDARY) ID_RACE (PRIMARY)Table Field HORSE_NO HORSE_NAME etc FINISH MARGIN SELECTION ID_RACE (SECONDARY) ID_FIELD (PRIMARY)Table History H_DATE H_TRACK H_GOING etc ID_FIELD (SECONDARY) ID_HISTORY (PRIMARY)What I am trying to determine is the number of trifectas (1st, 2nd, 3rd) I am picking. I have developed a ratings program in which I rate every horse 1 (best pick) to 10 (worst). I am now trying to move into the exotic forms of betting quinella, exacta, trifecta, quadrella etc and need to evaluate past selections (last 5 years) as to their effectiveness.Denis |
 |
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-09-26 : 16:51:21
|
Some sample data would be very helpful.CREATE TABLE statements for your tables: Meeting, Race, Field, HistoryAnd some sample data.And a sample result.http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxA clearly posed question has a higher chance of a clear answer If You had this for a hobby 10 yrs, it might seem very self-explanatory to You,but I would not mind further datea / explanation in order to help you. |
 |
|
|
|
|
|
|