invantive-dokumentationen del af invantive cloud
Invantive Support ForumsLog ind / Tilmeld dig

ABS

Syntaks

%%{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))

Formål

ABS-SQL-funktionen returnerer den absolutte værdi af et tal som decimal.

Parametre:

  • Input (decimal): Et tal.

Returnerer: den absolutte værdi som decimal.

Eksempler

ABS henter den absolutte værdi af 5 og -5:

select abs(5), abs(-5)

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

ABS henter den absolutte værdi af resultatet af en beregning:

select abs(452.55 * -9.667)

----------
4374.80085