portableSql

Sign Portable SQL Function

Syntax

Sign as N (Number as N)

Arguments

NumberNumeric

A numeric field or value.

Returns

resultNumeric

Returns 1 if Number is positive, 0 if it is zero and -1 if it is negative.

Description

Returns 1 if Number is positive, 0 if it is zero and -1 if it is negative.

Discussion

The Sign function returns 1 if Number is positive, 0 if it is zero and -1 if it is negative.

Sign() function executed on the Northwind Access database
SELECT FIRST 1 Sign(-12) AS EXPR1, SIGN(4) AS EXPR2 FROM Products
 = -1|1