Macro Several 'Make-Table' Queries without Warning Messages

  • Thread starter Thread starter whrogers
  • Start date Start date
W

whrogers

I have 25 'Make-Table' queries that take 5 to 6 hours each to finish. I'd
like to create a simple Macro that will run each query without the two
warning messages associated with 'Make-Table' queries so that the computer
will continue working over night and on the weekends. 'Open Query' commands
don't remove the warnings so I'd still need to check on my computer every 5
to 6 hours.

Thank you,
 
Whrogers,

Try putting a SetWarnings/No action before the first of the OpenQuery
actions.

Any idea why the queries are taking so long to run?
 
I'll try that this weekend.

The queries are counting the number of foreclosures within a distance and
within a time period for every house sale. So it must calculate the distance
from every sale to every foreclosure and then count those within the proper
distance. I have 150,000 sales observations and 15,000 foreclosures.

Below is the general code I'm using.

SELECT sales.saleID, LAST(sales.dateStamp), COUNT(projects.dateStamp)
FROM sales LEFT JOIN projects
ON sales.dateStamp >= projects.dateStamp
AND sales.x >= projects.x - dist
AND sales.x <= projects.x + dist
AND sales.y >= projects.y - dist
AND sales.y <= projects.x + dist
AND (sales.x-projects.x)^2 + (sales.y-projects.y)^2 <= dist ^2
GROUP BY sales.saleID

I'm open to any suggestions.
 
Back
Top