# 22. Virtuoso Functions Guide - abs

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
abs
atof
bit_and
bit_not
bit_or
bit_shift
bit_xor
ceiling
either
equ
exp
floor
isdouble
isfloat
isinteger
isnumeric
iszero
log
log10
lower
mod
power
randomize
rnd
sign
sqrt
trigonometric
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## abs

Return the absolute value of a number
abs (in num any);
Parameters
num – Numeric value whose absolute value is to be returned
Return Types

Same as parameter type.

Description

abs returns the absolute value of its argument.

Examples
Simple example

Get absolute values of several numeric values

    SQL> select cast (abs (-2.343) as numeric),
      cast(abs (0) as numeric),
      cast (abs (3.1415) as numeric);

    callret          callret         callret
    DECIMAL          DECIMAL         DECIMAL
    _________________________________________

    2.343            0               3.1415

    1 Rows. -- 5 msec.