AnsweredAssumed Answered

ExecuteSQL text in a variable

Question asked by jbrown Expert on Dec 16, 2012
Latest reply on Jan 27, 2014 by amy

Hey all,

I've started noticing that people on here, through examples, are putting the Text of a ExecuteSQL statement in a variable, and then using another variable to inset that test into the ExecuteSQL function:

 

$Var1 = Value: "SELECT COUNT(*) From Students WHERE School = ?")

$Var2 = Value: ExecuteSQL($Var;"";"";$$School)

 

 

Despite my probable errors above, what is thevalue of placing the text of the query in a variable and using that variable in the ExecuteSQL function? Is it faster to pull the SQL function results when the text has been stored in a variable? Is it a matter of keeping the query text separate to edit?

 

Just curious.

thanks

Outcomes