AnsweredAssumed Answered

Query.Where  SQL Statement

Question asked by msa3d007 on Jan 3, 2015
Latest reply on Feb 16, 2017 by rfairhur24

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

Outcomes