Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8269811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:21:23+00:00 2026-06-08T06:21:23+00:00

I wan’t to compare two coordinates in my database, but i can’t use the

  • 0

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)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:21:25+00:00Added an answer on June 8, 2026 at 6:21 am

    SUM is an aggregation function, so it works when you have a GROUP BY. Just remove it . . .

    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 <= (48.453354+0.01) 
          AND latitude >=(48.453354-0.01)
          AND longitude <= (2.306644+0.06) 
          AND longitude >= (2.306644-0.06);
    

    You should also use proper join syntax and you can simplify using between:

    SELECT m.numMag, nomMag, photoMag, URLMag, latitudeMag,
           longitudeMag, numEns, numAdr 
    FROM Mag m join
         Prix p 
         on m.numMag=p.numMag 
    WHERE p.numProduit=1 and
          latitude between (48.453354-0.01) and (48.453354+0.01) and
          longitude between (2.306644-0.06) and (2.306644+0.06)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wan't to compare two strings in a SQL request so I can retrieve
I wan't to use Sql Server 2008 as production environment with provider System.Data.SqlClient and
I wan't to use this controll in my app but cant find which it
I wan't to use some C source in my Objective-c proj but the source
i wan to use ADODB components in my project, but i cant find adodb
I wan't to make a class that I will use to convert database tables
I wan to monitor changes in android system file /sys/class/net/eth0/operstate for monitoring ethernet state.
I wan't to build SMS triggered app in my android. I know there's a
I wan to select the tiles but able to edit the other and type
i wan to create a program that can get the application name i can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.