using cursor parameter in the from clause...
Has someone ever tried to give the schema used in a cursor's query as a parameter to this cursor ?
Something like :
cursor my_cursor (my_schema varchar2)
select whatever from my_schema.table;
Object identifiers (schema name, table name, ....) can't be substituted with bind variables. Annd parameters in this case are just that - bind variables.
So no, it can't be done directly. You could use dynamic sql, though. But of course again, you will not be able to use binding method - you will have to use concatenation to construct your cursor and then execute it.
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Thx for your fast and efficient answer Juri
Click Here to Expand Forum to Full Width