Jump to content

Sql query that doesnt work tryign to use between two values


DanielStead

Recommended Posts

Here is the sql statement

 

SELECT ParcelID, x, y

FROM Polygons

WHERE Parish = '{Stadhampton}'

AND ParcelID = 91

AND x BETWEEN 460000 AND 460500

AND y BETWEEN 199000 AND 199500;

 

Not really too sure bout the between statements as the query worked fine why i didnt use between anyone any ideas as i have never used between before

 

Link to comment
Share on other sites

[!--quoteo(post=323926:date=Dec 2 2005, 05:52 PM:name=DanielStead)--][div class=\'quotetop\']QUOTE(DanielStead @ Dec 2 2005, 05:52 PM) 323926[/snapback][/div][div class=\'quotemain\'][!--quotec--]

SELECT ParcelID, x, y

FROM Polygons

WHERE Parish = '{Stadhampton}'

AND ParcelID = 91

AND x BETWEEN 460000 AND 460500

AND y BETWEEN 199000 AND 199500;

try

SELECT ParcelID, x, y
FROM Polygons
WHERE Parish = '{Stadhampton}'
AND ParcelID = 91
AND (x BETWEEN 460000 AND 460500)
AND (y BETWEEN 199000 AND 199500);

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.