Recursion ??

hi can a recursive procedure be achieved ???
like from below
create or replace procedure i_recursion (i_number number)
is
i_number2 number ;
begin
i_number2:=i_number+i_recursion(i_number+1);
if i_number = 1000 then
return ;
end if;
end;
but i'm getting error as
Warning: Procedure created with compilation errors.
SQL> show errors;
Errors for PROCEDURE I_RECURSION:
LINE/COL ERROR
5/1 PL/SQL: Statement ignored
5/21 PLS-00222: no function with name 'I_RECURSION' exists in this
scope
SQL>

804282 wrote:
u r asking me tyo learn Logo :(There are far worse teaching languages. I can teach basic programming concepts in Logo to primary school students - and they will grasp the fundamentals and (hopefully) have fun doing it. Can anyone say the same about Java?
No, I do not expect you to learn Logo - but I do expect you to realise that some language are by far superior teaching tools. And if you are a student in computer sciences, you should take this into account.
There's an interesting opinion piece on this published a couple of days ago called No wonder CompSci grads are unemployed. And much of that the author said, I concur with.
It is not about the language, but how capable you are at solving problems using it. So do not dis count* something as Logo as old fashioned or useless.
* Took me 4 postings to figure out that "dis" and "count" joined together is a forbidden word here... sometimes.. just sometimes.. OTN forums sucks and suck fricken badly.

Similar Messages

  • How can I implement a recursive update within triggers?

    Given
    INSTANCE (table)
    INST_ID
    etc.
    INSTANCE_STRUCTURE (table)
    PARENT_ID (fk to INST_ID)
    CHILD_ID (fk to INST_ID)
    And that I COULD write code which recursively navigates the hierarchy (ie. START WITH parent_id = ? CONNECT BY PRIOR child_id = parent_id) and issues UPDATEs to each "child" along the way, thereby propogating the desired update, how can I accomplish the same thing using triggers?
    Keep in mind I am using Oracle 7.3 and I have no choice. Also, the DBA is very difficult to get a hold of and I have no idea if there may be some server settings which are preventing some of my attempts from succeeding.
    Of course the simplest method is to make an update trigger on INSTANCE select all CHILD_ID from INSTANCE_STRUCTURE and issue UPDATE to each which, in turn, would invoke the same trigger, however, we can't have a mutating table, now can we?
    Next, I tried the old global variable in a package bit. That's when I first started getting this "end of channel" business which essentially disconnects me from Oracle (while using SQLPlus). I started to debug that, and then other users started getting errors ... apparently due to the global variable being global ACROSS sessions ... which I did not expect (correct me if I'm wrong and I can try it again), however, due to the amount of data I'm dealing with in any one particular line of hierarchy, I'm not sure I wouldn't get an error anyhow ... particularly if I have to maintain a global array for everyone at once. Anyhow, it was during that, that I realized the "too many open cursors" thing and so I started working with START WITH CONNECT BY to identify all rows which must be dealt with.
    Then, I tried setting up some new tables (as opposed to global variables) in which I would identify userenv('sessionid') and other data so that a BEFORE UPDATE, FOR EACH ROW trigger could check to make sure that the AFTER UPDATE trigger had not begun yet (IOW, not recursing yet). Basically, everything's fine until the AFTER UPDATE trigger tries to apply UPDATEs for the children (identified from a cursor on START WITH CONNECT BY) ... then I get the "end of channel" thing again.
    Obviously, this whole thing is an attempt to denormalize some data for performance reasons.
    Any help would be appreciated.
    Thanks.

    Nevermind, I figured somethin' out.

  • How to find square root, log recursively???

    I need to find the square root of a number entered recursively and log as well. Your help would be greatly appreciated. Thanks in advance!
    import java.io.*;
    /**Class provides recursive versions
    * of simple arithmetic operations.
    public class Ops2
         private static BufferedReader in = null;
         /**successor, return n + 1*/
         public static int suc(int n)
              return n + 1;
         /**predecessor, return n - 1*/
         public static int pre(int n)
              if (n == 0)
                   return 0;
              else
                   return n - 1;
         /**add two numbers entered*/
         public static int add(int n, int m)
              if (m == 0)
                   return n;
              else
                   return suc(add(n, pre(m)));
         /**subtract two numbers entered*/
         public static int sub(int n, int m)
              if (n < m)
                   return 0;
              else if (m == 0)
                   return n;
              else
                   return pre(sub(n, pre(m)));
         /**multiply two numbers entered*/
         public static int mult(int n, int m)
              if (m == 0)
                   return 0;
              else
                   return add(mult(n, pre(m)), n);
         /**divide two numbers entered*/
         public static int div(int n, int m)
              if (n < m)
                   return 0;
              else
                   return suc(div(sub(n, m), m));
         /**raise first number to second number*/
         public static int exp(int n, int m)
              if (m == 0)
                   return 1;
              else
                   return mult(exp(n, pre(m)), n);
         /**log of number entered*/
         public static int log(int n)
              if (n < 2)
                   return 0;
              else
                   return suc(log(div(n, 2)));
         /**square root of number entered*/
         public static int sqrt(int n)
              if (n == 0)
                   return 0;
              else
                   return sqrt(div(n, ));
         /**remainder of first number entered divided by second number*/
         public static int mod(int n, int m)
              if (n < m)
                   return 0;
              else
                   return mod(div(n, pre(m)), m);
         public static void prt(String s)
              System.out.print(s);
         public static void prtln(String s)
              System.out.println(s);
         public static void main(String [ ] args)
              prtln("Welcome to the amazing calculator");
              prtln("It can add, multiply and do powers for");
              prtln("naturals (including 0). Note that all the");
              prtln("HARDWARE does is add 1 or substract 1 to any number!!");
              in = new BufferedReader(new InputStreamReader ( System.in ) );
              int It;
              while ( (It = getOp()) >= 0)
                   prt("" + It + "\n");
            private static int getOp( )
            int first, second;
            String op;
            try
                System.out.println( "Enter operation:" );
                do
                    op = in.readLine( );
                } while( op.length( ) == 0 );
             System.out.println( "Enter first number: " );
                first = Integer.parseInt( in.readLine( ) );
                System.out.println( "Enter second number: " );
                second = Integer.parseInt( in.readLine( ) );
             prtln("");
             prt(first + " " + op + " " + second + " = ");
                switch( op.charAt( 0 ) )
                  case '+':
                    return add(first, second);
                  case '-':
                       return sub(first, second);
                  case '*':
                    return mult(first, second);
                  case '/':
                       return div(first, second);
                  case '^':
                    return exp(first, second);
                  case 'v':
                       return log(first);
                  case 'q':
                       return sqrt(first);
                  case '%':
                       return mod(first, second);
                  case 's':
                       return suc(first);
                  case 'p':
                       return pre(first);
                  default:
                    System.err.println( "Need +, *, or ^" );
                    return -1;
            catch( IOException e )
                System.err.println( e );
                return  0;
    }

    Hi,
    Is there any one to make a program for me in Turbo
    C++ for Dos, which can calculate the square root of
    any number without using the sqrt( ) or any ready
    made functions.
    The program should calculate the s.root of the number
    by a formula or procedure defined by the user
    (programmer).
    Thanks.This is a Java forum!
    If you want Java help:
    1. Start your own thread.
    2. Use code tags (above posting box) if you post code.
    3. No one will write the program for you. We will help by answering your questions and giving advice on how to fix problems in code you wrote.
    4. The formula you need to implement is given above by dizzy.

  • Confusion between references in recursion

    Hi all,
    I am trying to create B+ trees for a database. My algorithm for the insert function is:
    void insert(page_no, entry, newchildentry )
    if page_no is not a leaf ,say N
    find i such that Ki <= entry's key value < K i+1   //choose subtree
    insert(newPage(i), entry,newchildentry )
    if newchildentry is null, return;
    else
              if N has space, insert the newchildentry, set it to null and return
             else
             split the page in half, the newchildentry is set to a new value
             if N is the root , do some extra things return;
    if  page_no is a leaf, say L
    if  L has space, insert entry on to it, set newchildentry to null and return;
    else split L in half, populate the newchildentry to some new values
    return;
    }The problem that i am facing is that newchildentry is being populated by some values in the "if page_no is a leaf, say L" part and on collapsing the recursion, these values are being lost and I can't figure what the problem is. i'm new to java even though i have programmed in c/c++ before and i think this would work. is it because java is maintaining different placeholders for the newchildentry?
    thanks.
    ~dang_it

    Hi all,
    I am trying to create B+ trees for a database. My
    algorithm for the insert function is:
    void insert(page_no, entry, newchildentry )
    if page_no is not a leaf ,say N
    find i such that Ki <= entry's key value < K i+1
    //choose subtree
    insert(newPage(i), entry,newchildentry )
    if newchildentry is null, return;
    else
    if N has space, insert the newchildentry,
    hildentry, set it to null and return
    else
    split the page in half, the newchildentry is
    dentry is set to a new value
    if N is the root , do some extra things
    ra things return;
    if  page_no is a leaf, say L
    if  L has space, insert entry on to it, set
    newchildentry to null and return;
    else split L in half, populate the newchildentry to
    some new values
    return;
    }The problem that i am facing is that newchildentry is
    being populated by some values in the "if page_no is
    a leaf, say L" part and on collapsing the recursion,
    these values are being lost and I can't figure what
    the problem is. i'm new to java even though i have
    programmed in c/c++ before and i think this would
    work. is it because java is maintaining different
    placeholders for the newchildentry?
    thanks.
    ~dang_itIn the code that is failing, what type is newchildentry. You need to be aware that objects are not passed in the argument list. A copy of the object reference is passed. When the method finishes, even if the object contents have changed, the reference has not. So, to say that in some case you set newchildentry to null does not change the newchildentry object reference in the calling method.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • SCRIPT5007: Unable to get property 'top' of undefined or null and too much recursion

    I am not sure about placing two questions into one post, but here it goes:
    The error above  "SCRIPT5007: Unable to get property 'top' of undefined or null" is coming from this function:
    Code: 
    $(function () { //this is the way to run your code at the DOM Ready event  $('a').click(function () { $('html, body').animate({ scrollTop: $($(this).attr('href')).offset().top }, 1500); return false; });  });
    This is the effected code I believe that is causing the problem:
    Code: 
    scrollTop: $($(this).attr('href')).offset().top
    the error occurs when I click on a "clear" button in my form. My website is one long page and that function allows my navigation to slide up and down the site. Without it, everytime you click a nav, it jumps to that anchor.
    For the 2nd problem, the too much recursion, the problem lies within here:
    Code: 
    function () { if ($.isReady) return; imReady = true; $.each($.includeStates, function (url, state) { if (!state) return imReady = false }); if (imReady) { $.readyOld.apply($, arguments) } else { setTimeout(arguments.callee, 10) } }
    where the error is actually coming from the 2nd "function" script. This is part of the browser compatibility script for mozilla/opera at the top of the index page. Any help would be great. Thanks.

    Ahh I apologize. I simply was posting to JavaScript forums in hopes of
    finding a solution. Sorry for the mixup.

  • How do i delete perticular type file(*.enc) from folder/File recursively ?

    i know File class and File[ ] of java
    but can u give me code to delete (*.enc) file from folder inside folder. i mean recursively.
    i used :
    if(encFile.isDirectory())
    File []fileList = (new File(encF)).listFiles();
    //File[] fileList2= (new File(encF)).listFiles();
    System.out.println("Your Directory is ="+encF);
    for(int i=0; i < fileList.length; i++)
    //put code here
    if( (fileList.toString().endsWith(".enc")))
    fileList[i].delete();
    System.out.println("encFile:"+fileList[i]+" deleted.");
    if(fileList[i].isDirectory())
    if( (fileList[i].toString().endsWith(".enc")))
    {         fileList[i].delete();
    System.out.println("encFile:"+ fileList[i]+ "deleted");
    System.gc();
    }//for
    }//check dir if

    http://forum.java.sun.com/thread.jspa?forumID=31&threadID=563148
    Next time, search for yourself.

  • SSRS Recursive Hierarchy for Bill of Material

    OK, here we go. I have been absolutely unable to find an answer anywhere after extensive searching so I will ask this here.
    First of all, I am trying to create an SSRS report for a Bill of Materials (product structure) with parent child recursive grouping to enable drill down to multiple levels. For the most part, I have achieved the goal of doing this with a proper CTE stored
    procedure and including a parent recursive reference to the Child group. Here is my result set of the CTE and the grouping settings:
    This produces a very pretty report that allows for drill down to levels with indents and levels and everything! Just one problem..... By grouping on the Component to get the recursive technology to work, the result set of my CTE which has 37 rows gets truncated
    down to 32 due to multiple rows getting merged because part numbers can be the same while used on more than one part. In this case, see rows 30 and 34. The child (component) is PLA331. Because they are the same part number but used with different parents,
    one of them gets eliminated and the result of my report looks like this:
    PLA331 should be listed under SA-0482 but it is not due to the grouping of the part PLA331. How do I get all of the results to display even if I am grouping on the component? I have tried removing 'Hide Duplicates' and it does nothing.
    BOMs are a very important part of a business so I am actually quite shocked that I am the only one having this structure issue. Perhaps everybody else doesn't have the same part listed on multiple levels of a BOM? Or a lot of people THINK they have the correct
    BOM structure but are unaware of this little problem?
    Thanks,
    Sayslah

    Hi Sayslah,
    Based on your description, I create a similar report in my test environment. However, I cannot reproduce the same issue as your post.
    Please refer to the steps below to check if there is something different. I create a dataset with three fields: Component, Parent, Qty.
    1. Add a table in the report body.
    2. In the Row Group dialog box, add Parent Group: [Component].
    3. Setting Component Group with Recursive parent: Component.
    4. Add Qty field in the table.
    You can refer to the screenshot below:
    If there are any misunderstanding, please feel free to let me know.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Delete  follow up  document recursive

    Hi folks,
    I' writing a report in order to delete orders but before deleteing these orders i have to delete the follow-up documents. in some cases follow-up document also have another follow up, so before delete the first on i have to delete the last one and the the Order. i wrote loop at lt_doc_flow into ls_doc_flow.
    lv_objects_to_delete = ls_doc_flow-REF_GUID.
    insert ls_doc_flow-REF_GUID into table lt_objects_to_delete.
    endloop.
    and the call function'crm-order_delete.
    in order to delte all  docflow, but it doesn't work.
    do u have any idea , how i can delete it recursive?
    thanks .

    Hello Liliane
    You have to define a recursive function in order to delete your documents.
    The following sample reports shows how to do that:
    *& Report  ZUS_SDN_RECURSIVE_CALLS
    REPORT  zus_sdn_recursive_calls.
    TYPE-POOLS: abap.
    TYPES: BEGIN OF ty_s_doc.
    TYPES:   guid(3)        TYPE n.
    TYPES:   ref_guid(3)    TYPE n.
    TYPES:   text(50)       TYPE c.
    TYPES:   deleted        TYPE abap_bool.
    TYPES: END OF ty_s_doc.
    TYPES: ty_t_doc    TYPE STANDARD TABLE OF ty_s_doc
                       WITH DEFAULT KEY.
    DATA:
      gs_doc    TYPE ty_s_doc,
      gt_doc    TYPE ty_t_doc.
    START-OF-SELECTION.
      PERFORM fill_docs.
      SORT gt_doc BY guid ref_guid.
      WRITE: / 'Flow of Documents:'.
      PERFORM write_docs.
      WRITE: / 'Deleted Documents:'.
      LOOP AT gt_doc INTO gs_doc
                     WHERE ( deleted = abap_false ).
        PERFORM delete_doc
                       USING gs_doc.
      ENDLOOP.
      write: / syst-uline.
      SKIP 2.
      " Reset delete flag
      gs_doc-deleted = abap_false.
      MODIFY gt_doc FROM gs_doc
          TRANSPORTING deleted
        WHERE ( deleted = abap_true ).
      " Change sorting
      SORT gt_doc BY ref_guid.
      WRITE: / 'Flow of Documents:'.
      PERFORM write_docs.
      WRITE: / 'Deleted Documents:'.
      LOOP AT gt_doc INTO gs_doc
                     WHERE ( deleted = abap_false ).
        PERFORM delete_doc
                       USING gs_doc.
      ENDLOOP.
    END-OF-SELECTION.
    *&      Form  FILL_DOCS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_docs .
    * define local data
      DATA:
        ls_doc    TYPE ty_s_doc.
      " Example: Doc_001 -> referenced by Doc_011 -> referenced by Doc_101
      "          Doc_002 -> Doc_012, Doc_013      -> Doc_112, Doc_113
      "          Doc_003 -> not referenced
      CLEAR: ls_doc.
      ls_doc-guid     = '001'.
      ls_doc-ref_guid = '000'. " no reference to other document
      ls_doc-text     = 'Document 001'.
      APPEND ls_doc TO gt_doc.
      CLEAR: ls_doc.
      ls_doc-guid     = '011'.
      ls_doc-ref_guid = '001'.
      ls_doc-text     = 'Document 011'.
      APPEND ls_doc TO gt_doc.
      CLEAR: ls_doc.
      ls_doc-guid     = '101'.
      ls_doc-ref_guid = '011'.
      ls_doc-text     = 'Document 101'.
      APPEND ls_doc TO gt_doc.
      CLEAR: ls_doc.
      ls_doc-guid     = '002'.
      ls_doc-ref_guid = '000'. " no reference to other document
      ls_doc-text     = 'Document 002'.
      APPEND ls_doc TO gt_doc.
      CLEAR: ls_doc.
      ls_doc-guid     = '012'.
      ls_doc-ref_guid = '002'.
      ls_doc-text     = 'Document 012'.
      APPEND ls_doc TO gt_doc.
      CLEAR: ls_doc.
      ls_doc-guid     = '013'.
      ls_doc-ref_guid = '002'.
      ls_doc-text     = 'Document 013'.
      APPEND ls_doc TO gt_doc.
      CLEAR: ls_doc.
      ls_doc-guid     = '112'.
      ls_doc-ref_guid = '012'.
      ls_doc-text     = 'Document 112'.
      APPEND ls_doc TO gt_doc.
      CLEAR: ls_doc.
      ls_doc-guid     = '113'.
      ls_doc-ref_guid = '013'.
      ls_doc-text     = 'Document 113'.
      APPEND ls_doc TO gt_doc.
      CLEAR: ls_doc.
      ls_doc-guid     = '004'.
      ls_doc-ref_guid = '000'.  " no reference to other document
      ls_doc-text     = 'Document 004'.
      APPEND ls_doc TO gt_doc.
    ENDFORM.                    " FILL_DOCS
    *&      Form  delete_doc
    *       text
    *      -->P_GS_DOC_GUID  text
    FORM delete_doc
                USING
                   value(us_doc)  TYPE ty_s_doc.
    * define local data
      DATA:
        ls_doc    TYPE ty_s_doc.
      LOOP AT gt_doc INTO ls_doc
                     WHERE ( ref_guid = us_doc-guid )
                     AND   ( deleted = abap_false ).
        PERFORM delete_doc
                       USING ls_doc.
      ENDLOOP.
      IF ( syst-subrc NE 0 ).
        us_doc-deleted = abap_true.
        MODIFY gt_doc FROM us_doc
            TRANSPORTING deleted
          WHERE ( guid = us_doc-guid ).
        WRITE: / us_doc-guid, us_doc-text+0(15), us_doc-ref_guid.
      ENDIF.
    ENDFORM.                    " delete_doc
    *&      Form  WRITE_DOCS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM write_docs .
    * define local data
      DATA:
        ls_doc    TYPE ty_s_doc.
      LOOP AT gt_doc INTO ls_doc.
        WRITE: / ls_doc-guid, ls_doc-text+0(15), ls_doc-ref_guid.
      ENDLOOP.
      SKIP.
    ENDFORM.                    " WRITE_DOCS
    Regards
      Uwe

  • ORA-00604: error occurred at recursive SQL level 1 ORA-01882: timezone

    Hi
    I'm trying to config my base_domain for SOA11g but i'm getting the following error when connecting to my Oracle XE DB to configure SOA,
    please help thanks
    Software installed
    OS: Windows 7 64bit
    DB: Oracle XE 10g
    Oracle SOA 11.1.1.4.0
    Oracle RCU 11.1.1.4.0
    Oracle wls1034_generic
    Error Detials
    Component Schema=SOA Infrastructure
    Driver=oracle.jdbc.xa.client.OracleXADataSource
    URL=jdbc:oracle:thin:@127.0.0.1:1521/XE
    User=DEV_SOAINFRA
    Password=********
    SQL Test=select 1 from schema_version_registry where owner=(select user from dual) and mr_type='SOAINFRA' and version='11.1.1.4.0'
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01882: timezone region  not found
    CFGFWK-60850:  Test Failed!
    Component Schema=User Messaging Service
    Driver=oracle.jdbc.OracleDriver
    URL=jdbc:oracle:thin:@127.0.0.1:1521/XE
    User=DEV_ORASDPM
    Password=********
    SQL Test=select 1 from schema_version_registry where owner=(select user from dual) and mr_type='ORASDPM' and version='11.1.1.2.0'
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01882: timezone region  not found
    CFGFWK-60850:  Test Failed!
    Component Schema=OWSM MDS Schema
    Driver=oracle.jdbc.OracleDriver
    URL=jdbc:oracle:thin:@127.0.0.1:1521/XE
    User=DEV_MDS
    Password=********
    SQL Test=select 1 from schema_version_registry where
                        owner=(select user from dual) and mr_type='MDS' and
                        version='11.1.1.4.0'
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01882: timezone region  not found
    CFGFWK-60850:  Test Failed!
    Component Schema=SOA MDS Schema
    Driver=oracle.jdbc.OracleDriver
    URL=jdbc:oracle:thin:@127.0.0.1:1521/XE
    User=DEV_MDS
    Password=********
    SQL Test=select 1 from schema_version_registry where owner=(select user from dual) and mr_type='MDS' and version='11.1.1.4.0'
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01882: timezone region  not found
    CFGFWK-60850:  Test Failed!
    Component Schema=OSB JMS Reporting Provider
    Driver=org.apache.derby.jdbc.ClientDriver
    URL=jdbc:derby://127.0.0.1:1521/XE;create=true;ServerName=127.0.0.1;databaseName=XE
    User=DEV_SOAINFRA
    Password=********
    SQL Test=SELECT 1 FROM SYS.SYSTABLES
    Insufficient data while reading from the network - expected a minimum of 6 bytes and received only 0 bytes.  The connection has been terminated.
    CFGFWK-60850:  Test Failed!

    Hi,
    Please check the timezone set in your server where Weblogic is installed. Also ensure the timezone on which your weblogic is running, the same is present in in database by querying V$TIMEZONE_NAMES table. If it is not present then please change the timezone of the server. then try to execute the steps what you are doing, it will not throw any error.
    if this helps please mark.
    Thanks,
    Kishore

  • ORA-00604: error occurred at recursive SQL level 1

    Hi,
    i have a view as source (DB2)
    Target table in Oracle with the same structure
    when i view data from the view all the records are listed.
    after mapping the source and target source gets fail while debuging (test data)
    and also while deploying the mapping i get the following error.
    Anyone knows about the following errors
    ACBLODS_MAP
    Create
    Warning
    ORA-06550: line 0, column 0:
    ORA-04052: error occurred when looking up remote object [email protected]@DB2_KAPIL_LOCATION
    ORA-00604: error occurred at recursive SQL level 1
    ORA-28500: connection from ORACLE to a non-Oracle system returned this
    please someone help me to solve this
    thanks in advance
    regards
    raja

    I had a simular problem with progress. If the progress table had to many columns
    OWB was failing. The problem was the ODBC driver used to make a connection to PROGRESS.

  • ORA-00604: error occurred at recursive SQL level 1 (Call to a Oracle View)

    I have created a view that refers to a package function within the sql select.
    Like
    E.x
    CREATE OR REPLACE VIEW VW_TAX
    as select
    test_pkg.fn_get_gl_value(acct_id) desired_col1,
    test_pkg.fn_get_gl_desc_value(acct_id) desired_col2
    From tables a, b
    a.col= b.col
    The sample function( fn_get_gl_value) is embedded into a package (test_pkg).
    Function fn_get_gl_value:
    It earlier referred to table A1, B1, C1 and this query took really long, Therefore I used object type tables and stored the values required once within the package when it is invoked. Later I used the Tables A1, B1 and C1(table Cast from the type Table Loaded in Package Memory)
    The query was fast and fine, but now when I try to re-use the view
    select * from VW_TAX
    where acct_id = '02846'
    It fails with this message
    09:32:35 Error: ORA-00604: error occurred at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    Note: The database is Oracle8i Enterprise Edition Release 8.1.7.4.0.
    Maximum cursors database is 500
    Please let me know if there is any known solution,
    Appreciate all your help
    Thanks
    RP

    Seems like your OPEN_CURSORS init.ora parameter is set too low.
    See Metalink Note:1012266.6 for details.
       ORA-01000: "maximum open cursors exceeded"
            Cause: A host language program attempted to open too many cursors.
                   The initialization parameter OPEN_CURSORS determines the
                   maximum number of cursors per user.
           Action: Modify the program to use fewer cursors. If this error occurs
                   often, shut down Oracle, increase the value of OPEN_CURSORS,
                   and then restart Oracle.

  • ORA-00604: error occurred at recursive SQL level

    I only have 2 users and approx 9 schemas.
    Why is this complaining about maximum cursors??
    Error message:
    ORA-00604: error occurred at recursive SQL level
    ORA-01000: maximum open cursors exceeded
    ORA-0064 error occurred at recursive SQL level
    Cause:
    An error occurred at recursive SQl level
    (a statement applying to internal dictionary tables)
    >>
    Created 2 users
    1) boundaries (User)
    has a couple of schema.
    National, provincial, district, village
    I have set-up the Primary & Foreign keys.
    Only 1 table has 1 row of data
    2) Projects (User)
    Set up one table - Program
    Program has a Primary Key.
    Foreign key is linked to (boundaries) national PK
    The problem occured when I entered data into boundaries.national

    Clive_S wrote:
    OS: Windows Server 2008 standard - 64 bit.
    Select * from v$version
    Oracle Database 11g release 11.1.0.7.0 - 64 bit
    PL/SQL release 11.1.0.7.0 - production core 11.1.0.7.0
    Production TNS for 64-bit windows: 11.1.0.7.0
    Production NLSRTL for 64-bit windows: 11.1.0.7.0
    I am trying to replicate in Oracle what I would do in SQL Server. There's your first mistake. There are too many differences. My first programming language was COBOL, but I don't write other languages as if they were COBOL.
    I cannot attach an image of the users & tablespace, to illustrate.Another reason to work in sqlplus.
    >
    I created 2 User = Boundaries and Project
    I created several schemas (tables)No, you created 2 schemas. One user = one schema = one user.
    A schema is not a table and a table is not a schema. A schema is a collection of objects, which can include multiple tables but only those owned by one username.
    >
    Boundaries (user)
    Tables:
    Country
    Province
    District
    Village
    Projects (user)
    Tables:
    Program
    Project.Program has a FK = Country that is linked to Boundaries.Country
    I need to create several scemas (databases):Another difference. a schema is not a database, though the sql server concept of a database is somewhat analogous to an oracle schema.
    Boundaries, Project, Assets.
    There are foreign keys linking the various schemas.FKs link tables not schemas.
    Edited by: EdStevens on Feb 26, 2010 10:30 AM

  • ORA-00604: error occurred at recursive SQL level 1 and ORA-30036:

    Hi Gurus,
    I am trying to shrink the table segment along with indexes.
    I am using
    alter table OWNER.TABLE shrink space cascade; syntax but after 1 hr i got the following error.
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-30036: unable to extend segment by 4 in undo tablespace 'UNDOTBS01'
    UNDO tablespace has sufficient space and undo_retention is 6Hrs. What could be the problem ?
    Or do i need to use
    alter table OWNER.TABLE shrink space; only ?
    Thanks & Regards

    Hi,
    I am doing this in testing enviornment and before this activity added 4g space to existing 50GB undo tablespace.
    No jobs are running in testing environment and the shrinking on table is of 12GB. I cann't import/export and truncate or move to different tablespaces as this has oracle advanced queue and chances are more to corrupt queues.
    Thanks

  • Ora-00604:error occurred at recursive SQL level 1 and Ora-04023

    hi all
    i am using oracle linux 5.5 and oracle Database 11g R2 while shutingdown the database i am getting
    the following errors.
    SQL> shutdown immediate;
    Ora-00604:error occurred at recursive SQL level 1
    Ora-04023: object select count(*) from reg$SQL>plz can anyone help me out?

    Couple of questions related to this issue:
    1.Is there anything in alert log. Post last 50 lines from alert log.
    2.Is there any trace / log generated by Oracle ?
    3.What is Memory_Target parameter value ?
    4.What is value of statistics_level parameter ?
    5.Did you perform any failed upgradation ?
    6.Are there any invalid objects in database ?
    Generally ORA-00604 is related to insufficient size of shared pool. Now, i am googling how to get a proper value of shared pool size ? I got that there is a view v$shared_pool_advice which will tell me the answer of this question. Ok, it means now question is how do i get the proper value of shared pool from v$shared_pool_advice; i mean how do i interpret this v$shared_pool_advice view ?
    No problem docs are there to answer this question : (How i got this link ? Open a new page---http://tahiti.oracle.com---selected 11.2 docs--in the left hand sided there is a search text box i entered v$shared_pool_advice and i got couple of links)
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17110/dynviews_3037.htm#REFRN30239
    I will read these links and now i will query this and DBA_HIST_SHARED_POOL_ADVICE views, interpret the values. Ok, but what about my original question i.e. ORA-00604 and 4023 ? If i am at this stage, understood all the values, it means now i can understand the meaning / sense of resizing of shared pool.
    ALTER SYSTEM SET statistics_level=TYPICAL SCOPE=SPFILE;
    You can monitor V$SGA_RESIZE_OPS to identify the range of values that Oracle is automatically resizing the DB_CACHE_SIZE and SHARED_POOL_SIZE components to. Then, pick an appropriate minimum value based on the range. There's no "magic formula". But V$SGA_RESIZE_OPS shows the sizes that Oracle has been automatically been resizing the SGA components to. The Buffer Cache Advisory section of the AWR report or V$DB_CACHE_ADVICE, V$SHARED_POOL_ADVICE, V$SGA_TARGET_ADVICE and DBA_HIST_SGA_TARGET_ADVICE are views that provide advisory information as well. Hemant @ SGA_MAX_SIZE and SGA_TARGET how to set minimum for pools
    So, these are the baby steps if i ever gets ORA-00604 and ORA-04023 on my test database. Do all these and feel free to post the next doubt, i am sure you will get the correct answer.
    Regards
    Girish Sharma

  • ORA-00604:error occurred at recursive SQL level1 ORA-01000:maximum open cur

    Dear Experts,
    I got Error During WebLoad Testing.
    Please give me solution.
    java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded

    It depends on how may cursors are used in your program and the parameter value for OPEN_CURSORS. If it is not possible to reduce the number cursors used in the program increase the OPEN_CURSORS value.
    regards

  • ORA-00604: error occurred at recursive SQL level 1 + ORA-04031

    Hi,
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Solaris: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    os version : SunOS oratest 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Fire-V210
    SQL> show parameter  sga_target
    NAME                                 TYPE        VALUE
    sga_target                           big integer 892M
    SQL> show parameter shared_pool_size
    NAME                                 TYPE        VALUE
    shared_pool_size                     big integer 112M
    when i do normal query i am getting ora-04031 error and 10g server is Automatic Shared Memory Management since i set sga_target and server as to do automatically readjusts the sizes of memory pools, if that is the case why it throwing ora-04031 error;
    below errors showing before bounce the database
    SQL> show parameter size
    ORA-04031: unable to allocate 3840 bytes of shared memory ("shared
    pool","unknown object","sga heap(1,0)","kglsim object batch")
    SQL> select * from tab
      2  ;
    select * from tab
    ERROR at line 1:
    ORA-04031: unable to allocate 3840 bytes of shared memory ("shared
    pool","select * from tab
    ","sga heap(1,0)","kglsim object batch")
    alert log file:
    Errors in file /oracle/admin/appsdb/bdump/appsdb_smon_19154.trc:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-04031: unable to allocate 3840 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","kglsim object batc
    h")
    Thanks
    PrakashEdited by: prakashdba on Jan 10, 2009 12:31 AM
    Edited by: prakashdba on Jan 10, 2009 4:10 AM

    And your version number is?
    And your patch level is?
    And your hardware and operating system are?
    What did you find when you looked this up at metalink?
    Did you follow the advice in the metalink Knowledge Base docs?

Maybe you are looking for

  • Why do I have white horizontal lines on my Macbook Pro Retina?

    When I am using my 15" Macbook Pro, there are often white horizontal lines that run across the screen. It usually happens when I am watching a video, typing, scrolling or just sitting on the desktop. There are days where the screen is perfect and the

  • Materialized Views Union ALL

    Sample SQL Query for Creating View CREATE MATERIALIZED VIEW TRIAL2 PARALLEL 4 BUILD IMMEDIATE REFRESH COMPLETE ENABLE QUERY REWRITE AS */ select maa.INVENTORY_ITEM_ID,maa.ORGANIZATION_ID,maa.SR_INSTANCE_ID from msc_atp_rules ma,           msc_atp_ass

  • When clause in SQL Loader

    hi, i am facing a problem during when clause in sql loader here is my control file options(direct=true) load data infile 'data_file.txt' truncate into table "TABLE_NAME" when col1 = '1' trailing nullcols col1 integer external TERMINATED BY ',', col2

  • E-mailing Photos from iPhoto not working since moving to iCloud.

    Since switching to iCloud, my iPhoto will not e-mail photos.  Says the e-mail server cannot recognize my username/password combination.  I am lost on this as I am using iCloud for e-mail just fine.

  • How to disactivate the lost mode after found?

    I put my iphone 4s to the lost mode via icloud.com, and after an hour i found my iphone. i entered my password, it didn't unlocked. in stead the screen went black. please help how to disactivate the lost mode via icloud.com since i cant enter the pas