How to Add Parameters to SQL

Parameters may be used in different locations within a SQL query, including nested queries. 

Examples of how to use parameters in a SQL query follow. Be careful to separate each item between the “~” with a pipe “|”. More than one option may be used with a parameter.

a. The parameter ID only

Ex. ~PaymentsLog_PaymentsDate_TextBox_GreaterThanEquals~

b. The parameter ID with the includeand option - includes an “and” before the parameter

Ex. ~PaymentsLog_PaymentsDate_TextBox_GreaterThanEquals|includeand~

c. The parameter ID with the noquotes option– does not include single quotes around the value

Ex. ~PaymentsLog_PaymentsDate_TextBox_GreaterThanEquals|noquotes~

d. The parameter ID with the generateclause_in option– generates an “in (value1, value2)” clause from a list value

Ex. ~PaymentsLog_PaymentsDate_TextBox_GreaterThanEquals|generateclause_in~

e. The parameter ID with the omitnovalue option – omits the parameter if no value is present

Ex. ~PaymentsLog_PaymentsDate_TextBox_GreaterThanEquals|omitnovalue~

  • This may also be accomplished by checking the Required box on the parameter itself