PL/SQL (MOSC)

MOSC Banner

Subquery in the dbms_* procedures

edited Mar 31, 2014 12:00PM in PL/SQL (MOSC) 2 commentsAnswered

Hello,

it is very useful to use subqueries in the procedures, and my 1st sentence is working:

select output from table( DBMS_WORKLOAD_REPOSITORY.AWR_REPORT_HTML( (select dbid from v$database), (select INSTANCE_NUMBER from v$instance), (select min(snap_id) from DBA_HIST_SNAPSHOT), (select max(snap_id) from DBA_HIST_SNAPSHOT)  ) ); / 

But 2nd isn't working:

exec DBMS_WORKLOAD_REPOSITORY.DROP_SNAPSHOT_RANGE( (select min(snap_id) from DBA_HIST_SNAPSHOT), (select max(snap_id) from DBA_HIST_SNAPSHOT) ); 

And I don't understand why 2nd produce the mistake, while 1st is working ?

Explain, please, is it bug or feature ?

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