Re: ERROR IS: ORA-01007: variable not in select list

From: Randolf Geist <>
Date: Wed, 3 Feb 2010 05:07:10 -0800 (PST)
Message-ID: <>

On Feb 2, 3:26 pm, Sudhir <> wrote:
> I tried renaming to I_tcnum, but still I'm getting the same error
> "ERROR IS: ORA-01007: variable
> not in select list".

The most obvious explanation for your error would be that your FETCH statement is the actual culprit - the number of INTO variables might not be consistent with your query definition.

This simple test case raises the same error:

  c sys_refcursor;
  s_dummy varchar2(1);
  s_dummy_culprit varchar2(1);
  open c for 'select dummy from dual';
  fetch c into s_dummy, s_dummy_culprit; --<== here is the problem   close c;


Oracle related stuff blog:

Co-author of the "OakTable Expert Oracle Practices" book: Received on Wed Feb 03 2010 - 07:07:10 CST

Original text of this message