to_money()

Scalar. Converts a given value to the appropriate money type, based on a given scale.

Syntax

to_money ( value, scale )

Parameters

value

A string, or a numeric type. The string must be all numeric, but can include a decimal point.

scale

An integer from 1 to 15.

Usage

Converts a given value to a money type, based on the given scale. The function takes a string or a numeric type as its argument, and the function returns a money.

Example

to_money (12.361, 2)returns 12.36.