Specifies a logical test to perform.
object IF(bool? condition, object trueValue, object falseValue)
bool IF(bool? condition, bool trueValue, bool falseValue)
string IF(bool? condition, string trueValue, string falseValue)
string[] IF(bool? condition, string[] trueValue, string[] falseValue)
byte? IF(bool? condition, byte? trueValue, byte? falseValue)
byte[] IF(bool? condition, byte[] trueValue, byte[] falseValue)
short? IF(bool? condition, short? trueValue, short? falseValue)
int? IF(bool? condition, int? trueValue, int? falseValue)
int[] IF(bool? condition, int[] trueValue, int[] falseValue)
long? IF(bool? condition, long? trueValue, long? falseValue)
double? IF(bool? condition, double? trueValue, double? falseValue)
decimal? IF(bool? condition, decimal? trueValue, decimal? falseValue)
Single? IF(bool? condition, Single? trueValue, Single? falseValue)
DateTime? IF(bool? condition, DateTime? trueValue, DateTime? falseValue)
Guid? IF(bool? condition, Guid? trueValue, Guid? falseValue)
Object | Description |
---|---|
condition | The logical test. |
trueValue | The value if true. |
falseValue | The value if false. |
If Value1 is NULL or an empty string return Value2.
IF(ISNULLOREMPTY(Value1), Value2, Value1)