PL/SQL (MOSC)

MOSC Banner

how to execute a query that is assigned to a plsql variable

edited Apr 1, 2015 10:02AM in PL/SQL (MOSC) 2 commentsAnswered

Hi All,

We are on 11.2.0.3 database on Windows 2008.I am working on a script to automatically create the datafile when there is an alert in the alertlog file to do so.

Below is an example of part of the sample code. I have the required query built in to the variable sql_text, but  dont know how to execute the query in that variable.

Even though the below output error is pointing at DECLARE as possible cause. I believe the issue is the execute... statement. As the code works well without the execute statement.

Please suggest how to execute the string/query in the variable. Thanks a lot.

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