Bruce Carson
Member²
We run cursors within our select statements all the time. Recently it stopped working and am not sure why. The following query isn't a query we are running but does demonstrate the issue.
Execute the following query in a sql window:
select t.table_name,
cursor (select c.column_name
from user_tab_cols c
where c.table_name = t.table_name) as columns
from user_tables t;
The query returns the following output:
PLSQL_PROFILER_RUNS
PLSQL_PROFILER_UNITS
PLSQL_PROFILER_DATA
STAFF_TR1
STAFF
LOAD_FROM_ICM_BASELINE_TMP
LOAD_FROM_ICM_BASELINE
When I click the box next to the to see the contents of the cursor a new window opens but I get the error ora-01001: Invalid Cursor. The strange thing is this used to work but something has changed to give this error.
Environment as follows:
PL/SQL Developer 7.0.3.1123
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi
PL/SQL Release 10.2.0.2.0 - Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.2.0 - Productio
NLSRTL Version 10.2.0.2.0 - Production
Execute the following query in a sql window:
select t.table_name,
cursor (select c.column_name
from user_tab_cols c
where c.table_name = t.table_name) as columns
from user_tables t;
The query returns the following output:
PLSQL_PROFILER_RUNS
PLSQL_PROFILER_UNITS
PLSQL_PROFILER_DATA
STAFF_TR1
STAFF
LOAD_FROM_ICM_BASELINE_TMP
LOAD_FROM_ICM_BASELINE
When I click the box next to the to see the contents of the cursor a new window opens but I get the error ora-01001: Invalid Cursor. The strange thing is this used to work but something has changed to give this error.
Environment as follows:
PL/SQL Developer 7.0.3.1123
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi
PL/SQL Release 10.2.0.2.0 - Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.2.0 - Productio
NLSRTL Version 10.2.0.2.0 - Production