Jump to content

Archived

This topic is now archived and is closed to further replies.

DanielStead

Sql query that doesnt work tryign to use between two values

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

 

Share this post


Link to post
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);

Share this post


Link to post
Share on other sites

×

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.