G
Guest
I have a huge database (20 mil records) behind my front-end Access db.
Trying to do a make table to narrow the down the data before running queries
and reports. If we manually enter in the criteria - (pointID) in a query it
is superfast. When I use the subquery it takes forever. The thought is to
have
the make table query select points from the ViewPoints table using an IN
select but instead of a subquery, somehow make it generate a list of values
(i.e. 4759, 4755, xxx, yyy, zzz).
Here is my current code.
SELECT FlowData.* INTO Flowdata_TempTable
FROM FlowData
WHERE (((FlowData.PointID) In (SELECT ViewPoints.PointID
FROM ViewPoints
WHERE (((ViewPoints.ViewID)=[Forms]![AA_MainMenu]![SelectView]))
)) AND ((FlowData.MeasurementDate) Between [Forms]![AA_MainMenu]![FromDate]
And [Forms]![AA_MainMenu]![ToDate]));
Can someone please help?
Trying to do a make table to narrow the down the data before running queries
and reports. If we manually enter in the criteria - (pointID) in a query it
is superfast. When I use the subquery it takes forever. The thought is to
have
the make table query select points from the ViewPoints table using an IN
select but instead of a subquery, somehow make it generate a list of values
(i.e. 4759, 4755, xxx, yyy, zzz).
Here is my current code.
SELECT FlowData.* INTO Flowdata_TempTable
FROM FlowData
WHERE (((FlowData.PointID) In (SELECT ViewPoints.PointID
FROM ViewPoints
WHERE (((ViewPoints.ViewID)=[Forms]![AA_MainMenu]![SelectView]))
)) AND ((FlowData.MeasurementDate) Between [Forms]![AA_MainMenu]![FromDate]
And [Forms]![AA_MainMenu]![ToDate]));
Can someone please help?