Using Conditions in the SQL Query
Following the WHERE clause, you can specify a search condition for the rows returned by the SELECT statement. The search condition returns a value when a condition evaluates to true about a specific row.
Valid conditions include:
- Equal
- Between
- Like
- Not In
- In
Note the following:
-
The parameters returned by the conditions selected in the SQL Query are specified on the Target Application Filters page in Data Management.
-
The = (equal) symbol in a complex query must precede the $ parameters.
-
Target application parameters can have values separated by a comma such as: IN,BETWEEN,NOT IN.
-
The system assigns the data type of the bind parameter. Number and Date are processed As Integer and Date. All other values are treated as Strings.
-
Conditionalized filters are available on the Filters tab of the Run Integration page in Data Integration.
The following table describes the conditions that you can use in the SQL Query.
Condition | Description |
---|---|
EQUAL |
Check whether two expressions are equal or not. If expressions are equal, then the condition is true and matched records are returned. When the following SQL statement is run for the equal condition and return records where the customer id equals Smith:
|
BETWEEN |
Checks values between a certain range and returns matched values. The BETWEEN condition is inclusive. Beginning and ending values are included. BETWEEN syntax:
|
LIKE |
Performs and returns pattern matching using wildcards in the WHERE clause of a SELECT statement. Two wildcards are used in conjunction with the LIKE operator:
LIKE syntax:
|
IN |
Equal to any value in a list of values. IN syntax:
|
NOT IN |
Check whether two expressions equal or not. If expressions are not equal, then condition is true and returns not matched records. NOT IN syntax:
|