Feedback

  • Contents
 

Sample Where Clauses

When building where clauses for use in a DB Query step, you must build the Where clause in a Assignment step (using the Expression Editor Assistant) and assign it as the value of a variable. Building a Where clause from the Expression Editor Assistant requires special formatting. Refer to the following examples when constructing your Where clauses:

Where statement:

"SELECT CUSTOMER_ID, CUSTOMER_NAME, STATE FROM CUSTOMER_TABLE WHERE STATE='IN' "

Assign WhereString using a literal: "STATE='IN'''

Assign WhereString using a variable: "STATE='' & SQLStr(var_state)

Where statement:

" SELECT CUSTOMER_ID, CUSTOMER_NAME, STATE FROM CUSTOMER_TABLE WHERE STATE='IN' AND ACTIVE=1 "

Assign WhereString using a literal: "STATE='IN' AND ACTIVE=1"

Assign WhereString using variables: "STATE='' & SQLStr(var_state) & " AND ACTIVE=1"

Note: See the SQLStr help for more information on the SQLStr function.