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 expression with a Boolean data type 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?