18.19 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
FUNCTION 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 )
    RETURN PLS_INTEGER;Parameters
Table 18-17 GET_COLUMN_POSITION Function Parameters
| Parameter | Description | 
|---|---|
| 
 | Context object obtained with one of the  | 
| 
 | Attribute label to format error messages. | 
| 
 | Column name. | 
| 
 | Indicates whether this is a required column. | 
| 
 | Indicates the requested data type. | 
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.
                  
Parent topic: APEX_EXEC