Question
need another way to summarize data
I have an asp page that displays various statistics about
data in the underlying database (Access 2003). The data
manipulation is handled on the database side, so all I have to do
is grab the numbers and slap them on the asp page, really.
Now, however, I was asked to allow the user to see the same statistics based on a date range they select on the page. At first I thought this was a simple task, but can't figure out how to do it.
Now I need the ability to FIRST filter out the data based on the date range specified by the user, and THEN run all my database calculations. ...but how do you first grab a subset of data from a table, and then in the same database run more queries on it?
Is there a way to do this? If yes, how? If no... is there another way I've not yet learned or thought of?
The only other thought I have is to write code that will loop through my recordsets and come up with the numbers to do the calculations on the page, but that seems like ... well, like there should be a better way!
Any help greatly appreciated.
Now, however, I was asked to allow the user to see the same statistics based on a date range they select on the page. At first I thought this was a simple task, but can't figure out how to do it.
Now I need the ability to FIRST filter out the data based on the date range specified by the user, and THEN run all my database calculations. ...but how do you first grab a subset of data from a table, and then in the same database run more queries on it?
Is there a way to do this? If yes, how? If no... is there another way I've not yet learned or thought of?
The only other thought I have is to write code that will loop through my recordsets and come up with the numbers to do the calculations on the page, but that seems like ... well, like there should be a better way!
Any help greatly appreciated.
