I need to produce a simple 'table' - (query output) like the one below:
Entries Prizes
No. Entries | 1st | 2nd | 3rd | 4th | 5th
1 to 3 | $10 | $7.50 | $5.00 | $0 | $0
4 to 6 | $10 | $7.50 | $5.00 | $3.50 | $0
7 to 9 | $10 | $7.50 | $5.00 | $3.50 | $1
I have 3 tables:
tblPrizeScheme - this collects the name of the scheme and the references to the tblPrizeValues and tblPrizePlaces:
PrizeSchemeID | PrizeValueID | PrizePlaceID
127 | 1 | 1
128 | 2 | 2
tblPrizeValues - Collects the amounts of the prizes by position e.g.
PrizeValuesID | 1st | 2nd | 3rd | 4th | 5th
1 | $15 | $10 | $5.00 | $2.50 | $0
2 | $10 | $7.50| $5.00 | $3.50 | $1
tblPrizePlaces - collects the number of entries that trigger prizes, each field is a place, e.g.
PrizePlaceID | 1st | 2nd | 3rd | 4th | 5th
1 | 1 | 1 | 1 | 3 | 6
2 | 1 | 1 | 1 | 4 | 7
When queried, if I link the tables together, it produces a result like this:
PrizeSchemeID | PrizePlace.1st | PrizeValue 1st | PrizePlace.1st | PrizeValue 1st
127 | 1 | $15 | 1 | $10 etc...
There are several issues with this approach. First, I have no idea how to pivot the information to produce the 'table' at the start of this thread, secondly I was wondering if there was a more simple and effective way to solve the collection and presentation of the information?
Any suggestions on how I use the information as I have already collected it, or a better approach would be most appreciated
Entries Prizes
No. Entries | 1st | 2nd | 3rd | 4th | 5th
1 to 3 | $10 | $7.50 | $5.00 | $0 | $0
4 to 6 | $10 | $7.50 | $5.00 | $3.50 | $0
7 to 9 | $10 | $7.50 | $5.00 | $3.50 | $1
I have 3 tables:
tblPrizeScheme - this collects the name of the scheme and the references to the tblPrizeValues and tblPrizePlaces:
PrizeSchemeID | PrizeValueID | PrizePlaceID
127 | 1 | 1
128 | 2 | 2
tblPrizeValues - Collects the amounts of the prizes by position e.g.
PrizeValuesID | 1st | 2nd | 3rd | 4th | 5th
1 | $15 | $10 | $5.00 | $2.50 | $0
2 | $10 | $7.50| $5.00 | $3.50 | $1
tblPrizePlaces - collects the number of entries that trigger prizes, each field is a place, e.g.
PrizePlaceID | 1st | 2nd | 3rd | 4th | 5th
1 | 1 | 1 | 1 | 3 | 6
2 | 1 | 1 | 1 | 4 | 7
When queried, if I link the tables together, it produces a result like this:
PrizeSchemeID | PrizePlace.1st | PrizeValue 1st | PrizePlace.1st | PrizeValue 1st
127 | 1 | $15 | 1 | $10 etc...
There are several issues with this approach. First, I have no idea how to pivot the information to produce the 'table' at the start of this thread, secondly I was wondering if there was a more simple and effective way to solve the collection and presentation of the information?
Any suggestions on how I use the information as I have already collected it, or a better approach would be most appreciated