I wan’t to compare two coordinates in my database, but i can’t use the addition or subtraction. The database i use is SQLite, on Android.
Here is my SQL request :
SELECT m.numMag, nomMag, photoMag, URLMag, latitudeMag,
longitudeMag, numEns, numAdr
FROM Mag m, Prix p
WHERE m.numMag=p.numMag AND p.numProduit=1
AND latitude <= SUM(48.453354+0.01)
AND latitude >=SUM(48.453354-0.01)
AND longitude <= SUM(2.306644+0.06)
AND longitude >= SUM(2.306644-0.06);
Of course this request is completely wrong, but it’s my last test. Somebody can help me ?
Other information : SUM(generated Float, -/+number has already been set)
SUM is an aggregation function, so it works when you have a GROUP BY. Just remove it . . .
You should also use proper join syntax and you can simplify using between: