Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> ORA-01007 when executing DBMS_SQL.COLUMN_VALUE

ORA-01007 when executing DBMS_SQL.COLUMN_VALUE

From: Haresh Assumal <assumal_at_sprynet.com>
Date: 1997/10/30
Message-ID: <01bce4cc$25964e40$fab1aacc@mycomp.intermediainc.com>#1/1

Hi,
I am trying to get a count(*) of rows in using the following query in a PL/SQL function:

DBMS_SQL.PARSE

		(cursor_handle,
		 'SELECT count(*) FROM ' || table_name || 
		 ' WHERE ID  = ' || object_id ,
		 DBMS_SQL.V7);

execute_feedback := DBMS_SQL.EXECUTE(cursor_handle);

Note: table_name and object_id are PL/SQL variables. I get an error here when I try and do:

DBMS_SQL.COLUMN_VALUE(cursor_handle,1,num_ids);

Where num_ids is declared as number. The error is:

ORA-01007: variable not in select list         

Why do I get this? Any help would be much appreciated. Thanks,
Haresh
E-mail:assumal_at_sprynet.com Received on Thu Oct 30 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US