Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> ORA-01007 when executing DBMS_SQL.COLUMN_VALUE
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);
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