oracle11g - Casting a String to a Symbol in PLSQL -
oracle11g - Casting a String to a Symbol in PLSQL -
i've created anonymous plsql block test , i'm running issue formatting.
set serveroutput on  begin   in (select distinct do.subobject_name dba_objects do.object_name='my_table' , do.object_type='table partition') loop     dbms_output.put_line(i.subobject_name);      select       t.field             some_var           my_table partition(i.subobject_name) t;    end loop; end;    however several compilation errors, believe related fact i.subobject_name string. believe partition function wants actual partition symbol(proper term this?), can't give in loop. 
is there kind of casting function can perform i'm looking for?
partition is not function. partition keyword in context whole statement static , cannot pass partition name it; partition name must specified @ compile time. you can re-create statement dynamically , pass partition name in loop - a-la doing it. create sure concatenate string , not utilize bind variables, or statement @ run time won't parsed , won't run.
name symbol table partition
 plsql oracle11g 
 
Comments
Post a Comment