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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ADD_MONTHS<br />

Notes • ACOS takes the ratio (expression) of two sides of a right triangle and returns the<br />

corresponding angle. The ratio is the length of the side adjacent to the angle divided by the<br />

length of the hypotenuse.<br />

ADD_MONTHS<br />

Syntax<br />

select acos (.5) 'Arccosine in radians' from syscalctable;<br />

ARCCOSINE IN RADIANS<br />

--------------------<br />

1.047197551196598<br />

1 record selected<br />

select acos (.5) * (180/ pi()) 'Arccosine in degrees' from syscalctable;<br />

ARCCOSINE IN DEGREES<br />

--------------------<br />

59.999999999999993<br />

1 record selected<br />

• The result is expressed in radians and is in the range -Pi/2 to Pi/2 radians. To convert<br />

degrees to radians, multiply degrees by Pi/180. To convert radians to degrees, multiply<br />

radians by 180/Pi.<br />

• The expression must be in the range -1 to 1.<br />

• The expression must evaluate to an approximate numeric data type.<br />

Compatibility<br />

ODBC compatible<br />

Adds to the date value specified by the date_expression, the given number of months specified<br />

by integer_expression, and returns the resultant date value.<br />

ADD_MONTHS ( date_expression , integer_expression )<br />

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

SELECT *<br />

FROM customer<br />

WHERE ADD_MONTHS (start_date, 6) > SYSDATE ;<br />

Notes • The first argument must be of DATE type.<br />

• The second argument to the function must be of NUMERIC type.<br />

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

75

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

Saved successfully!

Ooh no, something went wrong!