SIGN

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the sign of a number: -1 for negative, 0 for zero, or +1 for positive.

Syntax 

1sign(<x>)

Arguments 

Required 

  • <x>: The numeric value to evaluate.

Returns 

Returns the sign of the argument by using the same data type as the input.

Examples 

Get the Sign of a Number 

Return the sign of a negative value.

1SELECT sign(-8.4) AS result;

Returns -1.

Related Documentation