IIF

<< Click to Display Table of Contents >>

 

IIF

Returns one of the values indicated in the @true_value and @false_value parameters, depending whether the Boolean expression indicated in the @boolean_expression parameter is evaluated as True or False, respectively. The returned data type is the same data type of the selected value.

 

Syntax

IIF(@boolean_expression, @true_value, @false_value)

 

Parameters

@boolean_expression: Boolean expression to evaluate

@true_value: Value to return if the @boolean_expression expression is evaluated as True

@false_value: Value to return if the @boolean_expression expression is evaluated as False

Was this page useful?