Home » SQL & PL/SQL » SQL & PL/SQL » can table name be a variable??? urgent
can table name be a variable??? urgent [message #37929] Thu, 07 March 2002 00:12 Go to next message
Prasad
Messages: 104
Registered: October 2000
Senior Member
Hai
I got pl/sql script which uses cursor to select all the table names from a master table & in the execution
stage ie after begin when I try to use this variable(table name) to select the contents from this table,it prompts me a error message saying that, "CHECK out U have the access to the tables" Please help me out in this regard
for more information portion of my script

DECLARE

cursor tot_tables IS
select distinct TEM_TABLES from MASTER_TABLE;

BEGIN

for tnames in tot_tables
loop

insert into AYR_TABLE (MANU_NAME)
select distinct a.v_pras_name
from v_pras_class a, v_pras1_class b, tnames.TEM_TABLES c where a.obj_id = b.v_pras_ptr and b.obj_id = c.obj_id;

commit;

end if;
end loop;
END;
/
Re: can table name be a variable??? urgent [message #37931 is a reply to message #37929] Thu, 07 March 2002 00:20 Go to previous message
Prasad
Messages: 104
Registered: October 2000
Senior Member
Please ignore "end if;".
Previous Topic: transfer data from excel File to Oracle
Next Topic: Rowid
Goto Forum:
  


Current Time: Fri Mar 29 05:04:06 CDT 2024