I have a table that contains a storelist and another that contains postal sectors and their longitude and latitude coordinates.
I have made an Excel spreadsheet that calculates the distance between two postal sectors based on their longitude and latitude coordinates.
I would like to convert my Excel spreadsheet into an Access query, if possible.
What I would ideally like is for a user to be able to run a find nearest query themselves from a form in the DB. I'm trying to find a way to run this query quickly. At the moment I see the problem as this -
I have 3000 postal sectors and 10000 stores. Those 10000 stores fall within the 3000 sectors. To find the nearest store i would match a store to postal sector and have to run my distance calculation on one sector to all 2999 other sectors before i can get the nearest five. I see two ways of doing this -
1. I run all the distance calculation for all 3000 sectors and then add the data to the DB. This would be very time consuming and produce enormous amounts of data.
2. Do the 2999 distance calculations when processing a query from a user. I'm not sure if this is possible or if it would be too slow for everyday use.
I think calling excel functions would definately be to slow for what i ultimately want.
Any pointers tips greatly appreciated!
Jaydeebe BSC (hons) MCP
I have made an Excel spreadsheet that calculates the distance between two postal sectors based on their longitude and latitude coordinates.
I would like to convert my Excel spreadsheet into an Access query, if possible.
What I would ideally like is for a user to be able to run a find nearest query themselves from a form in the DB. I'm trying to find a way to run this query quickly. At the moment I see the problem as this -
I have 3000 postal sectors and 10000 stores. Those 10000 stores fall within the 3000 sectors. To find the nearest store i would match a store to postal sector and have to run my distance calculation on one sector to all 2999 other sectors before i can get the nearest five. I see two ways of doing this -
1. I run all the distance calculation for all 3000 sectors and then add the data to the DB. This would be very time consuming and produce enormous amounts of data.
2. Do the 2999 distance calculations when processing a query from a user. I'm not sure if this is possible or if it would be too slow for everyday use.
I think calling excel functions would definately be to slow for what i ultimately want.
Any pointers tips greatly appreciated!
Jaydeebe BSC (hons) MCP