Hi,
Help - I do not know SQL!
I have a problem that I think will be solved with a SQL sub query but have
no idea how to go about creating one!
The table is for a publishing application that I have created in Access. The
requirement is to establish the no of pages per copy given the variables
for the no of copies (circulation) to be printed and the budget amount availab
le.
No Copies | 16 pages | 24 Pages | 36 Pages | etc etc
1000 | $10000 | $12000 | $13000 | etc etc
2000 | $18000 | $20000 | $23500 | etc etc
etc etc
o The table contains ranges for No of Copies in col 1. e.g. 1 to 1000 copies
; 1001 to 1999 copies etc.
o The input maybe any number of copies
e.g. 1250 which would fit row 2 (2000) in the above example.
o The Budgets are handled in the same way in that they may be any amount but must fit a specified range in the table.
e.g a budget of $18700 for 1250 copies would fit row 2, column 3 ($20000) in the above example.
In this example, the answer to the lookup should be row 2 (2000), column 3
($20000). This would mean that 24 pages are required to meet the target for this publication.
I think the table records should be designed as:
Max No Copies; Cost; No Pages - (Seq = Ascending on Copies; Cost)
Any suggestions would be very welcome?
Help - I do not know SQL!
I have a problem that I think will be solved with a SQL sub query but have
no idea how to go about creating one!
The table is for a publishing application that I have created in Access. The
requirement is to establish the no of pages per copy given the variables
for the no of copies (circulation) to be printed and the budget amount availab
le.
No Copies | 16 pages | 24 Pages | 36 Pages | etc etc
1000 | $10000 | $12000 | $13000 | etc etc
2000 | $18000 | $20000 | $23500 | etc etc
etc etc
o The table contains ranges for No of Copies in col 1. e.g. 1 to 1000 copies
; 1001 to 1999 copies etc.
o The input maybe any number of copies
e.g. 1250 which would fit row 2 (2000) in the above example.
o The Budgets are handled in the same way in that they may be any amount but must fit a specified range in the table.
e.g a budget of $18700 for 1250 copies would fit row 2, column 3 ($20000) in the above example.
In this example, the answer to the lookup should be row 2 (2000), column 3
($20000). This would mean that 24 pages are required to meet the target for this publication.
I think the table records should be designed as:
Max No Copies; Cost; No Pages - (Seq = Ascending on Copies; Cost)
Any suggestions would be very welcome?