IF statement syntax
The IF statement uses the following format:
IF (expression1) THEN (expression2) ELSE (expression3)
The variables are:
- expression1 is evaluated and determined to be true or false
- expression2 is executed if expression1 is true
- expression3 is executed if expression1 is false
The parentheses enclosing each expression are required. All clauses of the IF statement must be specified. For example, you cannot leave off the ELSE clause if you are only interested inexpression1 results which are true. You must still code the ELSE; in this case, simply code a dummyexpression3 using a constant value such as 0.
Generally,expression1 will be a relational expression, possibly involving Boolean operators. However, it can also be an arithmetic expression which is considered false if it evaluates to 0, and otherwise is considered true. Any of the expressions in an IF statement can themselves be IF statements.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*