locked
error about invalid column index (PL/SQL) RRS feed

  • Question

  • User-1075092149 posted

    my sp in PL/SQL has 2 output variable, when i run the sp in SQL Development, it always returns the error about "invalid column index". how to fix it? or how to find out where the problem is encountered?

    Monday, August 6, 2012 12:30 PM

Answers

  • User-578610739 posted

    Hi Member,

    This show that you are no value in your output variable. it's most likely because you are trying to get or set a value from a ResultSet, but the index you are using isn't within the range.

    If you return cursor, then do this.

    CURSOR c1
        IS SELECT SYSDATE FROM DUAL; 

    If you return simple variable , then set default value.

    To check properly, you run test window in PL/SQl developer tool.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 7, 2012 1:59 AM

All replies

  • User635950694 posted

    Can you please post your PL/SQL code here.

    One of the reason for this error is

    You are attempting to use or access a column that is not in the select list.

    Monday, August 6, 2012 12:44 PM
  • User-578610739 posted

    Hi Member,

    This show that you are no value in your output variable. it's most likely because you are trying to get or set a value from a ResultSet, but the index you are using isn't within the range.

    If you return cursor, then do this.

    CURSOR c1
        IS SELECT SYSDATE FROM DUAL; 

    If you return simple variable , then set default value.

    To check properly, you run test window in PL/SQl developer tool.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 7, 2012 1:59 AM