Hi,
I would like to use a substitution variable to store the name of thw schema owner. I have something like this:
define sv_SchemaName = 'SUSIE';
CREATE VIEW &&sv_SchemaName.TEST_VIEW
blah blah
BEGIN
DBMS_STATS.GATHER_TABLE_STATS(ownname =>'&&sv_SchemaName', tabname => 'TEST_VIEW');
END;
The variable comes out as SUSIETEST_VIEW without the dot ("."), so it breaks the CREATE VIEW code. It does work for the DBMS_STATS line, though. Is there a way to remedy this?
Thank you for your help!
Susie
I would like to use a substitution variable to store the name of thw schema owner. I have something like this:
define sv_SchemaName = 'SUSIE';
CREATE VIEW &&sv_SchemaName.TEST_VIEW
blah blah
BEGIN
DBMS_STATS.GATHER_TABLE_STATS(ownname =>'&&sv_SchemaName', tabname => 'TEST_VIEW');
END;
The variable comes out as SUSIETEST_VIEW without the dot ("."), so it breaks the CREATE VIEW code. It does work for the DBMS_STATS line, though. Is there a way to remedy this?
Thank you for your help!
Susie