get*columnbyindex()

Returns the value of a column identified by an index.

Syntax

getbinarycolumnbyindex ( record, colname )
getstringcolumnbyindex ( record, colname )
getlongcolumnbyindex ( record, colname )
getintegercolumnbyindex ( record, colname )
getdatecolumnbyindex ( record, colname )
gettimestampcolumnbyindex ( record, colname )
getbigdatetimecolumnbyindex ( record, colname )
getintervalcolumnbyindex ( record, colname )
getbooleancolumnbyindex ( record, colname )
getfloatcolumnbyindex ( record, colname )
getxmlcolumnbyindex ( record, colname )

Parameters

name

The name of a stream or window.

colindex

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

Usage

Returns the value of a column identified by an index. The function takes a string for thename argument and an integer for the colindex argument. The function returns the same datatype as specified in the function's name (a string for getstringcolumnbyindex(), for example).

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 int, b string) 
PRIMARY KEY (a) MEMORY STORE "memstore";

If you assume that the input passed into iwin1 was (1, 'hello'), then getstringcolumnbyindex ( iwin1, 1 ) would return 'hello'.