D
David
Never did a subquery so HELP?
I'm trying to go a query where I can specify a period (say a day) and have a
sub period (say 30 minutes) reflected within that daily query.
For example the resulting query table would look like:
Date Beg High Low End
11/9/2008 9:30:00 AM Values
11/9/2008 10:00:00 AM Values
11/9/2008 10:30:00 AM Values
I've written the query to rollup my data for the above 30 minute period.
It is:
PARAMETERS [pDateBeg] DateTime, [pDateEnd] DateTime;
SELECT FIRST(fldHistBeg) AS fldBeg, MAX(fldHistHigh) AS fldHigh,
MIN(fldHistLow) AS fldLow, LAST(fldHistEnd) AS fldEnd
FROM tblTest
WHERE (fldHistDateTime) BETWEEN [pDateBeg] And [pDateEnd];
QUESTION:
How do I merge the the above query (assume this would be a subquery) within
another query -- such that I can specify the day of interest (would require
another set of Parameters) and return the correct table by period (here 30
minutes) needed?
Is there a better way?
I'm trying to go a query where I can specify a period (say a day) and have a
sub period (say 30 minutes) reflected within that daily query.
For example the resulting query table would look like:
Date Beg High Low End
11/9/2008 9:30:00 AM Values
11/9/2008 10:00:00 AM Values
11/9/2008 10:30:00 AM Values
I've written the query to rollup my data for the above 30 minute period.
It is:
PARAMETERS [pDateBeg] DateTime, [pDateEnd] DateTime;
SELECT FIRST(fldHistBeg) AS fldBeg, MAX(fldHistHigh) AS fldHigh,
MIN(fldHistLow) AS fldLow, LAST(fldHistEnd) AS fldEnd
FROM tblTest
WHERE (fldHistDateTime) BETWEEN [pDateBeg] And [pDateEnd];
QUESTION:
How do I merge the the above query (assume this would be a subquery) within
another query -- such that I can specify the day of interest (would require
another set of Parameters) and return the correct table by period (here 30
minutes) needed?
Is there a better way?