invantive documentationpart of invantive cloud
Invantive Support ForumsLog In / Sign Up

ABS

Syntax

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> | | ABS[ABS]:::quoted
    ABS --> End((END))

Purpose

The ABS SQL function returns the absolute value of a number as decimal.

Parameters:

  • Input (decimal): A number.

Returns: the absolute value as decimal.

Examples

ABS retrieves the absolute value of 5 and -5:

select abs(5), abs(-5)

-------- --------
5        5

ABS retrieves the absolute value of the outcome of a calculation:

select abs(452.55 * -9.667)

----------
4374.80085