23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ABS<br />

ABS<br />

Syntax<br />

74<br />

Scalar functions<br />

Scalar functions calculate a value based on another single value. Scalar functions are also called<br />

value functions and can be nested.<br />

Computes the absolute value of expression.<br />

Example This example illustrates the ABS function:<br />

Notes • The argument to the function must be of type TINYINT, SMALLINT, INTEGER, NUMERIC,<br />

REAL, or FLOAT.<br />

ACOS<br />

Syntax<br />

ABS ( expression )<br />

SELECT ABS (MONTHS_BETWEEN (SYSDATE, order_date))<br />

FROM orders<br />

WHERE ABS (MONTHS_BETWEEN (SYSDATE, order_date)) > 3 ;<br />

• The result is of type NUMERIC.<br />

• If the argument expression evaluates to NULL, the result is NULL.<br />

Compatibility<br />

ODBC compatible<br />

Returns the arccosine of expression.<br />

ACOS ( expression )<br />

Example In this example, which illustrates two ways to use the ACOS function, the first SELECT statement<br />

returns the arcosine in radians, and the second returns the arcosine in degrees:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!