Math Canonical Functions

Abs (value)

Returns the absolute value of value

Examples

var esql = "Abs(-10)";
var value = db.CreateQuery<int>(esql).Single();
esql = "Abs(10)";
value = db.CreateQuery<int>(esql).Single();

Ceiling (value)

Returns the smallest integer that is not less than value.

Examples

var esql = "Ceiling(12.4)";
var value = db.CreateQuery<int>(esql).Single();

Floor (value)

Returns the largest integer that is not greater than value.

Examples

var esql = "Floor(13.4)";
var value = db.CreateQuery<object>(esql).Single();

Power (value, expression)

Returns the result of the specified value to the specified exponent.

Examples

var esql = "Power(133, 4)";
var value = db.CreateQuery<object>(esql).Single();

Round (value)

Returns the integer portion of value, rounded to the nearest integer.

Examples

var esql = "Round(748.58)";
var value = db.CreateQuery<object>(esql).Single();

Round (value, digits)

Returns the value, rounded to the nearest specified digits.

Examples

var esql = "Round(748.58,1)";
var value = db.CreateQuery<object>(esql).Single();

Truncate (value, digits)

Returns the value, truncated to the nearest specified digits.

Examples

var esql = "Truncate(748.58, 1)";
var value = db.CreateQuery<object>(esql).Single();

Last edited Mar 24, 2013 at 9:35 AM by ansiboy, version 1

Comments

No comments yet.