Question

Recursive stored procedure

Rating9.0Excellent

Can I have a recursive stored procedure?, something like this:

create or replace procedure test(num in number) as
num integer;
begin
  for i in 1..5 loop
   num := test(i);
  end loop;
end;

And if it's possible, is that code correct?

Thanx

  1. adding row num
    hi, i am getting this error ORA-01427: single-row subquery returns more than one row as its not unique i remeber adding row(num) once and then it was good can you please advice how can i do that update dmt_aa_dm l set l.EMPLOYEE_STATUS = (select decode(k.empl_status,'Leave','Active','Termina…
  2. How to loop through a PL/SQL table in a stored …
    Experts: This a a test procedure. I just want to loop through a pl/sql table that is being returned from a stored proceudre. This is what I have right now and it complains that bioset_t is not a cursor: for v_row in bioset_t LOOP RecordCount := RecordCount + 1; DBMS_OUTPUT.PUT_LINE('bioset_t = ' || bios…
  3. Oracle - Stored Procedure - Loop through valu…
    Hello all I have something similar but not quite the same to deal with to limit round trips to the server. I want to pass to an oracle procedure a list of values either comma or pipe delimited. I then need to in the proc loop through each value and insert the value into a table. Does anyone have any good examples? Thanks all I am hoping this time it takes to put it together i…
  4. oracle production to test -- replication
    what are the various options used to replicate the production database to test database for VLDB's( size is > 4TB)???
  5. ORACLE STORE PROCEDURE PROBLEM
    HI: What it is the problem with this STORE PROCEDURE, I need send the parameter pID_DESEMBOLSO_FUENTE_FINAN, and if: a) pID_DESEMBOLSO_FUENTE_FINAN = 0 ; must return ALL THE ROWS IN THE TABLE b) pID_DESEMBOLSO_FUENTE_FINAN IS NULL; must return ALL THE ROWS IN THE TABLE c) pID_DESEMBOLSO…

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution
View This Solution - Start Your 30 Day Free Trial
Zone
General
Tags
procedures recursive stored
Participating Experts
2
Solution Grade
A

Replies

 
by: schwertner

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: slightwv

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by:

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: stefanaichholzer

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: schwertner

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: schwertner

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Stay Connected

Oracle Around the Web

The latest Oracle news, tips, and tricks

Oracle Unveils Netra SPARC T3 Servers

New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...

read more

Oracle fixes 21 flaws in Java SE, Java for Business

Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...

read more

Obama’s Silicon Valley “Tech Supper”

Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...

read more

Featured Oracle Experts

slightwv

slightwv has answered more than 2,000 Oracle questions and oversees database management within the U.S. Government. Slightwv

sdstuber

A regular presenter at the Collaborate conference, Oracle developer sdstuber is a top expert in PL/SQL and Oracle 9, 10 and 11. sdstuber

Testimonials

What users are saying about our experts

"The Oracle gurus provide answers, solutions and valuable workarounds"

User: schwertner

"Wow! Excellent, valuable explanation. Hats off to you"

User: aseshu70

"Solution worked fantastic and performs excellent! Thanks heaps"

User: klausbrandlhuber

Top Experts

  1. slightwv

    2,000

    0 points yesterday

    Profile

BrowseBecome an Expert