AllExperts > Oracle 
Search      
Oracle
Volunteer
Answers to thousands of questions
 Home · More Oracle Questions · Answer Library  · Encyclopedia ·
More Oracle Answers
Question Library

Ask a question about Oracle
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Edson
Expertise
I can answer questions about Sql (including Sql tuning), pl/Sql and a bit of oracle administration

Experience
I work as a consultant in Brazil and I face problems of all kind in oracle every day development.

Education/Credentials
INFNET

 
   

You are here:  Experts > Computing/Technology > Oracle > Oracle > Execuitng queries stored in a table in a procedure

Oracle - Execuitng queries stored in a table in a procedure


Expert: Edson - 8/31/2009

Question
I have to execute 20+ static insert queries in procedure (which will be executed by a java scheduler).
I want to store these queries in a oracle table and populate a data structure in Procedure. This datastructure will get executed in a loop and would execute each query one by one.

Can you suggest an approch to implement this in an optimized manner

Thanks Ahead...


Answer
Hi there.

A good and common approach is to create a table with a blob column.

When you perform the loop, call the values of the blob with a execute immediate.

for rec in (...) loop

 execute immediate rec.column
 commit;


Wait your reply

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.