getmoneycolumnbyindex()

Returns the value of a column identified by an index.

Syntax

getmoneycolumnbyindex ( name, colindex, scale )

Parameters

name

The name of a stream or window.

colname

Integer corresponding to an index value of a column. Index is 0 based.

scale

An integer between 1 and 15.

Usage

Returns the value of a column identified by an index. The function takes a string for the name and integers for the colindex and scale arguments. 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 SCHEMA (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 getmoneycolumnbyindex ( iwin1, 1, 3 ) would return 1.123.