Please Login or Register  to view this content.
I have this macro running good but the problem is it is too slow. I need to update 121 thousand records and it processes 1 record per 2 seconds...that would take me around more than 2 days to get it done. Is there any way I can optimize this code? I know its in the sql statement but I am not really good at it.

What it does is it gets all records from say table1 from the selected records(PostalNumber(YuubinBangou in code),Latitude,Longitude) it computes the number of nearby locations based on their latitude and longitude. After counting it updates table1 with the number of nearby locations (5km,10km,15km in the code it is 3.1056mi,6.2112mi,9.3168mi)per postalNumber.


Any help would be greatly appreciated. Thank you!