Previous Topic

Next Topic

NullIf - SQL Function

NULLIF(Expr1: Variant, Expr2: Variant:): Variant

NullIf is a conditional function. If Expr1 is equal to Expr2, NULL is returned, else Expr1 is returned.

NullIf function syntax has these named arguments:

Parameter

Description

Expr 1

Required. Expression to be compared to Expr2.

Expr 2

Required. Expression to be compared to Expr1.

The following example returns the ExchangeRate for Invoices, if the ExchangeRate is not equal to 1:

SELECT DocumentID, NullIf(ExchangeRate, 1) FROM INHEAD

See Also

SQL Case Functions

Book Contents

Book Index