Query has error
SELECT SQL_CALC_FOUND_ROWS camp.*,(CASE '44301' WHEN Area.zip_index THEN 0 ELSE (3963 * acos(Center.sin_latitude * Area.sin_latitude + Center.cos_latitude * Area.cos_latitude * cos(Area.longitude - Center.longitude))) END) as Miles, Area.city, Area.zip_code, Area.state from zipcode as Center join zipcode as Area on (CASE '44301' WHEN Area.zip_index THEN 0 ELSE (3963 * acos(Center.sin_latitude * Area.sin_latitude + Center.cos_latitude * Area.cos_latitude * cos(Area.longitude - Center.longitude))) END) <= '200' join camp on Area.zip_code = camp.zip where Center.zip_index = '44301' AND camp.camp_status = 'Complete' AND design_verify='1' order by Miles ASC
Error : Out of sort memory, consider increasing server sort buffer size