Let me explain with an example.
I have a postcode
NW1 5LR and its
LATITUDE:51.546069024064 LONGITUDE:-0.235949008191785 coming from user entry. I also have many other postcodes and their Latitide&Longitide values in database. What formula should I use to get only those postcodes which are in 1 mil away maximum?