Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » UltraLite - Database Management and Reference » UltraLite SQL Reference » UltraLite SQL functions » SQL functions (P-Z)

 

TRUNCNUM function [Numeric]

Truncates a number at a specified number of places after the decimal point.

Syntax
{ TRUNCNUM | "TRUNCATE" }( numeric-expression, integer-expression )
Parameters
  • numeric-expression   The number to be truncated.

  • integer-expression   A positive integer specifies the number of significant digits to the right of the decimal point at which to round. A negative expression specifies the number of significant digits to the left of the decimal point at which to round.

Returns

NUMERIC

Remarks

If any parameter is NULL, the result is NULL.

See also
Standards and compatibility
  • SQL/2003   Vendor extension.

Example

The following statement returns the value 600.

SELECT TRUNCNUM( 655, -2 );

The following statement: returns the value 655.340.

SELECT TRUNCNUM( 655.348, 2 );