Contents Index TRIM function [String] TRUNCNUM function [Numeric]

ASA SQL Reference
  SQL Functions
    Alphabetical list of functions

TRUNCATE function [Numeric]


Function 

Truncates a number at a specified number of places after the decimal point. Deprecated in favor of TRUNCNUM.

Syntax 

"TRUNCATE( numeric-expressioninteger-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.

Usage 

This function is the same as TRUNCNUM. Using TRUNCNUM is recommended as it does not cause keyword conflicts.

The quotation marks are required because of a keyword conflict with the TRUNCATE TABLE statement. You can only use TRUNCATE without the quotation marks if the QUOTED_IDENTIFIER option is set to OFF.

Standards and compatibility 
See also 

QUOTED_IDENTIFIER option [compatibility]

TRUNCNUM function [Numeric]

Example 

The following statement returns the value 600.

SELECT "TRUNCATE"( 655, -2 )

The following statement returns the value 655.340.

SELECT "TRUNCATE"( 655.348, 2 )

Contents Index TRIM function [String] TRUNCNUM function [Numeric]