i have a problem writing a sql where statment ,
here is my code( working fine ) :
var cadname = dom.byId("CADName").value ; | ||
var fromno= dom.byId("fromNo").value ; | ||
var tono= dom.byId("toNo").value ; | ||
query.where = " CAD_NAME= '" + cadname + "' AND LAND_NUMBER=" + fromno ;
--------------------
the above code working fine , but i want to add more " AND " Statement , so the query result is between " fromno" and " endno" .
i want the statement looks like
query.where = " CAD_NAME= '" + cadname + "' AND LAND_NUMBER>" + fromno AND LAND_NUMBER< " +tono ;
i think the problem in the sequence of single and double quotes.
Thank you
M-Sa3d
Solved! Go to Solution.
You forgot to put a + and open quotes after the fromno variable. It should be:
query.where = "CAD_NAME= '" + cadname + "' AND LAND_NUMBER > " + fromno + " AND LAND_NUMBER < " + tono;
You forgot to put a + and open quotes after the fromno variable. It should be:
query.where = "CAD_NAME= '" + cadname + "' AND LAND_NUMBER > " + fromno + " AND LAND_NUMBER < " + tono;
Thank you Richard
Richard Fairhust, would you mind helping me out with the same issue. I am currently enrolled in a GIS class and having a really tough time. THanks so much.
Did you create your own post with the code that is not working? You should and then link to it in a post here so I will be notified.