syntax error in utilizing between

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


syntax error in utilizing between



When executing the following code...



SELECT city,
6371 * 2 * ASIN(SQRT(POWER(SIN(RADIANS(40.85093330 - ABS(sample_locations.latitude))), 2) + COS(RADIANS(40.85093330)) * COS(RADIANS(ABS(sample_locations.latitude))) * POWER(SIN(RADIANS(-73.97013820 - sample_locations.longitude)), 2))) AS distance
FROM sample_locations
WHERE sample_locations.latitude BETWEEN (40.85093330 – 10 / (111.04)) AND (40.85093330 + 10 / (111.04)) AND sample_locations.longitude BETWEEN (-73.97013820 – 10 / ABS(COS(RADIANS(40.85093330)) * 111.04)) AND (-73.97013820 + 10 / ABS(COS(RADIANS(40.85093330)) * 111.04))
HAVING distance < 10
ORDER BY distance LIMIT 10;



I get the error...



1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '– 10 / (111.04)) AND (40.85093330 + 10 / (111.04)) AND sample_locations.longit' at line 4 (line 4 is where the first between starts)









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Stripe::AuthenticationError No API key provided. Set your API key using “Stripe.api_key = ”

CRM reporting Extension - SSRS instance is blank

Keycloak server returning user_not_found error when user is already imported with LDAP