Table of Contents

Search

  1. Preface
  2. Function reference
  3. Constants
  4. Operators
  5. Dates
  6. Functions
  7. System variables
  8. Datatype reference

Function Reference

Function Reference

SIGN

SIGN

Returns whether a numeric value is positive, negative, or 0.

Syntax

SIGN(
numeric_value
)
Argument
Required/
Optional
Description
numeric_value
Required
Numeric value. Passes the values you want to evaluate. You can enter any valid expression.

Return Value

-1 for negative values.
0 for 0.
1 for positive values.
NULL if NULL.

Example

The following expression determines if the SALES column includes any negative values:
SIGN( SALES )
SALES
RETURN VALUE
100
1
-25.99
-1
0
0
NULL
NULL

0 COMMENTS

We’d like to hear from you!