getmoneycolumnbyname()

Returns the value of a column identified by an expression evaluated at runtime as a money type.

Syntax

getmoneycolumnbyname ( name, colname, scale )

Parameters

name

The name of a stream or window.

colname

An expression that evaluates to the name of a column with a money datatype, in the stream or window.

scale

An integer between 1 and 15.

Usage

Returns the value of a column identified by an expression evaluated at runtime. The function takes a string for the name and colname arguments and an integer to represent the scale of the money type. The function returns a money type with the specified scale.

If colname argument evaluates to NULL or the specified column does not exist in the associated window or stream, the function returns NULL and generates an error message.

Example

CREATE MEMORY STORE "memstore";
CREATE INPUT WINDOW iwin1 SCEHMA (a money(1), b money(3)) 
PRIMARY KEY (a) MEMORY STORE "memstore";

If you assume that the input passed into iwin1 was (1.2, 1.23), then getmoneycolumnbyname ( iwin1, b, 3 ) would return 1.123.