Using variable as schema / table names?
816741Nov 19 2010 — edited Nov 22 2010Hello all -
First time poster :)
I would like to use PL SQL to do something like so
--***************RUN MAIN******************
DEFINE SCHEMA_NAME = 'SCHEMA_NAME' CHAR;
DEFINE FINAL_TABLE = 'FINAL_TABLE ' CHAR;
BEGIN
SELECT DISTINCT COLUMN FROM SCHEMA_NAME.FINAL_TABLE
END
However this doesn't work. I've googled and found other ways like producing a prompt but those are always in the string to search for and not the name of the schema or table to run the SQL on. I am not sure if this is even possible. Any help would be appreciated.
Thanks!
Edited by: 813738 on Nov 19, 2010 11:02 AM