Siebel Business Analytics Server Administration Guide > SQL Reference > SQL Reference >

Math Functions


The math functions perform mathematical operations.

Abs

Calculates the absolute value of a numerical expression.

Syntax:

ABS (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Acos

Calculates the arc cosine of a numerical expression.

Syntax:

ACOS (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Asin

Calculates the arc sine of a numerical expression.

Syntax:

ASIN (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Atan

Calculates the arc tangent of a numerical expression.

Syntax:

ATAN (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Atan2

Calculates the arc tangent of y/x, where y is the first numerical expression and x is the second numerical expression.

Syntax:

ATAN2 (n_expression1, n_expression2)

where:

n_expression (1 and 2)

Any expression that evaluates to a numerical value.

Ceiling

Rounds a noninteger numerical expression to the next highest integer. If the numerical expression evaluates to an integer, the Ceiling function returns that integer.

Syntax:

CEILING (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Cos

Calculates the cosine of a numerical expression.

Syntax:

COS (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Cot

Calculates the cotangent of a numerical expression.

Syntax:

COT (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Degrees

Converts an expression from radians to degrees.

Syntax:

DEGREES (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Exp

Sends the value e to the power specified.

Syntax:

EXP (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Floor

Rounds a noninteger numerical expression to the next lowest integer. If the numerical expression evaluates to an integer, the FLOOR function returns that integer.

Syntax:

FLOOR (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Log

Calculates the natural logarithm of an expression.

Syntax:

LOG (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Log10

Calculates the base 10 logarithm of an expression.

Syntax:

LOG10 (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Mod

Divides the first numerical expression by the second numerical expression and returns the remainder portion of the quotient.

Syntax:

MOD (n_expression1, n_expression2)

where:

n_expression (1 and 2)

Any expression that evaluates to a numerical value.

Pi

Returns the constant value of pi (the circumference of a circle divided by the diameter of a circle).

Syntax:

PI()

Power

Takes the first numerical expression and raises it to the power specified in the second numerical expression.

Syntax:

POWER(n_expression1, n_expression2)

where:

n_expression (1 and 2)

Any expression that evaluates to a numerical value.

Radians

Converts an expression from degrees to radians.

Syntax:

RADIANS (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Rand

Returns a pseudo-random number between 0 and 1.

Syntax:

RAND()

RandFromSeed

Returns a pseudo-random number based on a seed value. For a given seed value, the same set of random numbers are generated.

Syntax:

RAND (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Round

Rounds a numerical expression to n digits of precision.

Syntax:

ROUND (n_expression, n)

where:

n_expression

Any expression that evaluates to a numerical value.

n

Any positive integer representing the number of digits of precision with which to round.

Sign

Returns a value of 1 if the numerical expression argument evaluates to a positive number, a value of -1 if the numerical expression argument evaluates to a negative number, and 0 if the numerical expression argument evaluates to zero.

Syntax:

SIGN (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Sin

Calculates the sine of a numerical expression.

Syntax:

SIN (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Sqrt

Calculates the square root of the numerical expression argument. The numerical expression has to evaluate to a nonnegative number.

Syntax:

SQRT (n_expression)

where:

n_expression

Any expression that evaluates to a nonnegative numerical value.

Tan

Calculates the tangent of a numerical expression.

Syntax:

TAN (n_expression)

where:

n_expression

Any expression that evaluates to a numerical value.

Truncate

Truncates a decimal number to return a specified number of places from the decimal point.

Syntax:

TRUNCATE (n_expression, n)

where:

n_expression

Any expression that evaluates to a numerical value.

n

Any positive integer representing the number of characters from the right of the decimal place that are returned.

Siebel Business Analytics Server Administration Guide