PL/SQL (MOSC)

MOSC Banner

How to get a stored stored procedure to work when a duplicate inline procedure works

edited May 16, 2011 4:01AM in PL/SQL (MOSC) 9 commentsAnswered
I am having an issue using dbms_metadata.get_dependent_ddl to work within a stored procedure.  When I execute it as an inline procedure it works fine.  What is the difference in the way they execute?
Here is a snippet of what I am trying to do, in the end this will go into a package and other tasks will be performed.  But this is the failure point right now.

inline procedure
 declare
  index_script clob;
  sql_stmt varchar2(100);
begin
 select dbms_metadata.get_dependent_ddl('INDEX', 'ACCOUNT','MART1') into index_script from dual;
 DBMS_OUTPUT.PUT_LINE(index_script);

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center