SELECT D.* FROM
(SELECT TOP (30) locId,
3959 * ACOS(COS(RADIANS(yourLatitud)) * COS(RADIANS(dbLatitud))
* COS(RADIANS(dbLongitude) - RADIANS( yourLongitud ))
+ SIN(RADIANS(yourLatitud)) * SIN(RADIANS(dbLatitud))) AS distance,
country, region, city,
postalCode,latitud,longitude
FROM yourTableLocation
ORDER BY distance) D
WHERE distance <= YourDesireDistance
ORDER BY distance
--To search by kilometers instead of miles, replace 3959 with 6371.