27.31 GET_COLUMN_POSITION Function

This function returns the array index for a given column alias. In order to do this lookup operation only once, Oracle recommends you to use GET_COLUMN_POSITION function before entering the NEXT_ROW loop. This saves on computing resources.

Syntax

APEX_EXEC.GET_COLUMN_POSITION (
    p_context               IN t_context, 
    p_column_name           IN VARCHAR2,
    p_attribute_label       IN VARCHAR2  DEFAULT NULL,
    p_is_required           IN BOOLEAN   DEFAULT FALSE,
    p_data_type             IN VARCHAR2  DEFAULT c_data_type_varchar2,
    p_parent_column_path    IN VARCHAR2  DEFAULT NULL )
    RETURN PLS_INTEGER;

Parameters

Parameter Description
p_context Context object obtained with one of the OPEN_ functions.
p_attribute_label Attribute label to format error messages.
p_column_name Column name.
p_is_required Indicates whether this is a required column.
p_data_type Indicates the requested data type.
p_parent_column_path Path to the parent column to look the index up within.

Returns

The position of the column in the query result set. Throws an exception when p_is_required or p_data_type prerequisites are not met.