Can crystal allow to call procedure from a procedure?

Hi,
Currently I am using crystal to call a procedure. The procedure will call another procedure by doing some insert statement in the second procedure. I heard that this could not be work, is that true? Is there any other way to do?

here is an example of a procedure calling another procedure to do the insert:
SQL> create table test_tab
  2  (id number);
Table created.
SQL> create or replace procedure procedure_1 as
  2  begin
  3    insert into test_tab
  4    select nvl(max(id),0)+1 from test_tab;
  5  end;
  6  /
Procedure created.
SQL> create or replace procedure procedure_2 as
  2  begin
  3    -- now we call the other procedure
  4    procedure_1;
  5    commit;
  6  end;
  7  /
Procedure created.
SQL> execute procedure_2;
PL/SQL procedure successfully completed.
SQL> select * from test_tab;
        ID
         1
SQL> execute procedure_2;
PL/SQL procedure successfully completed.
SQL> select * from test_tab;
        ID
         1
         2

Similar Messages

  • Unable to call a procedure from another procedure

    Hi there,
    I have created two procedures under my user login. Both of them have the same parameters.
    I was trying to call the other procedure from one procedure and am getting error message.
    Both the procedures are saved in different files. I am using LINUX command editor.
    Precedure1:
    CREATE PROCEDURE remove_emp (emp_no number) as
    BEGIN
    delete from sailors s where s.s_no = remove_emp.emp_no;
    END;
    Procedure2:
    CREATE PROCEDURE u_table (del_emp number) as
    BEGIN
    exec remove_emp(del_emp);
    END;
    /While am calling, this is what I am getting
    SQL> exec u_table(1003);
    BEGIN u_table(1003); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00905: object RAJIV.U_TABLE is invalid
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignoredPlease help me with this.
    Thanks
    Rajiv
    Message was edited by:
    RajivTx

    First thing..
    PLS-00905: object RAJIV.U_TABLE is invalidMeans..the procedure is not valid...meaning not compiled properly...because...u were using "exec remove_emp(del_emp);".... reason being is exec is valid in Sql*Plus... and u cant use it in a procedure ..with the same syntax ( dont ask me why..) unless u use dynamic sql.. u can directly call the procedure like...
    CREATE PROCEDURE u_table (del_emp number) as
    BEGIN
    remove_emp(del_emp);
    END;
    delete from sailors s where s.s_no = remove_emp.emp_no;Secondly ... (Just a suggestion).... aliases are better used when u have multiple tables and complex queries..or may be sometimes the table name is too long and confusing... avoid them when not neccessary

  • Call procedure from another procedure

    Hi All,
    I have a requirement to call a procedure from another procedure and don't want to return to the main procedure again.please suggest me how to achive this .
    thanks

    user13424229 wrote:
    I have a requirement to call a procedure from another procedure and don't want to return to the main procedure again.please suggest me how to achive this .A very strange requirement.. that perhaps you should expand on in order to get proper technical input and advice from forum members.
    Assuming a valid requirement, it should be implemented in the following way:
    SQL> create or replace procedure ProcB is
      2  begin
      3          DBMS_OUTPUT.put_line( 'ProcB(): executing...' );
      4  end;
      5  /
    Procedure created.
    SQL>
    SQL>
    SQL>
    SQL> create or replace procedure ProcA is
      2          E_CEASE_PROCESSING      exception;
      3          pragma exception_init(E_CEASE_PROCESSING, -20000 );
      4  begin
      5          DBMS_OUTPUT.put_line( 'ProcA(): executing...' );
      6          DBMS_OUTPUT.put_line( 'ProcA(): doing stuff 1...' );
      7          raise E_CEASE_PROCESSING; --// typically a conditional instruction
      8          DBMS_OUTPUT.put_line( 'ProcA(): doing stuff 2...' );
      9 
    10  exception when E_CEASE_PROCESSING then
    11          ProcB;
    12  end;
    13  /
    Procedure created.
    SQL>
    SQL>
    SQL> exec ProcA
    ProcA(): executing...
    ProcA(): doing stuff 1...
    ProcB(): executing...
    PL/SQL procedure successfully completed.
    SQL>

  • How can I access my Call Handlers from outside line (outside district)

    CISCO VoIP System Info:
    Cisco Unity Connection version: 8.6.2ES25.21900-25
    CM Admin System version: 8.6.2.21900-5 on C200M2 Servers
    Our engineer setup our Call Handlers so that in our to change the recordings on them, you diall 7800 from a phone inside the office, or as he put it in the procedures, from within the district.  Once you dial, you need to enter the user code, password, then the extension of the Call Handler, and we have no problems recording/changing any Call Handlers.  However, due to possible inclement weather approaching in the next few weeks, I was asked how we cna change them from an outside line (manager's home, etc.).  We cannot access from an outside line.  7800 is not a DID, it is simply the extension he assigned to access the call handlers.  I even went so far as to setup a dummy phone and forward it to 7800, but this does not work either.  It forwards to the extension's voicemail.  Is there a way we can access the Call Handlers from an outside line?  Any help would be gretaly appreciated.  Thank you in advance.

    Hey Joseph,
    Go Flames ....errrrrrrrrrrrrrrrrrr maybe not so much
    What you are trying to get to is really just the Greetings Administrator
    conversation and there are multiple ways to get there.
    For example, you can set up a Caller Input off any mailbox (Press 1-9) let's say 7 to
    go to Conversation> Greetings Administrator. So you could set this on the managers mailbox
    and when he calls his own number from home once his greeting
    kicks in he can press 7 to link to the Greetings Administrator conversation
    or
    You could set up a DID DN xxx-xxx-2345 as a CTI-RP and set Call Forward All to reach Unity Connection.
    In this case you will need to use the Forwarded Routing Rules = xxx-xxx-2345 route to
    Greetings Administrator. Make sure to move this rule to the bottom of the list!!
    Cheers!
    Rob
    "Why do the best things always disappear " 
    - The Band

  • How to call one procedure from another procedure

    Hi all,
    Could anyone give me clue how to call a procedure contains out parameters
    from another procedure.
    I had following procedures.
    1)
    create or replace procedure INS_PUR_ORDER
    p_poamt in number,
    p_podate in date,
    p_poid out number
    is
    begin
    select pkseq.nextval into p_poid from dual;
    insert into pur_order(poamt,podate,poid)
    values (p_poamt,p_podate,p_poid);
    end;
    2)
    create or replace procedure INS_PUR_ORDER_DETAIL
    p_pounits in number,
    p_poddate in date,
    p_poid in number)
    is
    begin
    Insert into pur_order_detail(podid,pounits,poddate,poid)
    values(pdseq.nextval,p_pounits,p_poddate,p_poid);
    end;
    I need to write a 3rd procedure which calls above two procedures.
    like
    call first procedure ,basing on the return value
    i.e if p_poid != 0 then
    we need to call second procedure
    in the loop.
    thanks in advance.
    rampa.

    Not sure what are you doing, you can not assign cursor to another cursor, may be you are looking for this?
    SQL> create or replace procedure proc1 ( result out sys_refcursor)
      2  is
      3  
      4  begin
      5     open result for
      6       select 'HELLO WORLD' from dual ;
      7  end proc1 ;
      8  /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4  begin
      5     l_cursor := proc1 ;
      6   
      7  
      8     open l_cursor;
      9     fetch l_cursor into l_text;
    10     dbms_output.put_line(l_text);
    11     close l_cursor;
    12  
    13  
    14  end proc2 ;
    15  /
    Warning: Procedure created with compilation errors.
    Elapsed: 00:00:00.01
    SQL> show error;
    Errors for PROCEDURE PROC2:
    LINE/COL ERROR
    5/4      PL/SQL: Statement ignored
    5/16     PLS-00306: wrong number or types of arguments
             in call to 'PROC1'
    6/4      PLS-00201: identifier 'L_TEXT' must be
             declared
    6/4      PL/SQL: Statement ignored
    8/4      PLS-00382: expression is of wrong type
    8/4      PL/SQL: SQL Statement ignored
    9/4      PL/SQL: SQL Statement ignored
    9/24     PLS-00201: identifier 'L_TEXT' must be
             declared
    10/4     PL/SQL: Statement ignored
    10/25    PLS-00201: identifier 'L_TEXT' must be
             declared
    ---- this is the correct waySQL>ed
      1  create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4     l_text varchar2(100);
      5  begin
    ---- procedure call
      6     proc1(l_cursor); 
    7    -- open l_cursor;
      8     fetch l_cursor into l_text;
      9     dbms_output.put_line(l_text);
    10     close l_cursor;
    11* end proc2 ;
    SQL> /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> set serveroutput on
    SQL> execute proc2;
    HELLO WORLD
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL>

  • How can I download full call info from old bills?

    Title says it all really. I forgot to download the call detail from my March bill and now I can't find how to do it. All I can do is download the PDF which I can't put into a spreadsheet.

    Sad to say i have had the same problem, worse still I can not even find out previous quarter billing.
    I have two bills missing for 2009, and the only way i can retrieve them is by paying a silly price of £4 for each bill and V.A.T.....
    I would advice people to stick with paper billing! at least they can have billing in black and white and be able to keep track on B.T's 3 monthly statements........................

  • IOS7 Bug: Why is that i can only making an call works from notification area without unlocking the Phone using the passcode

    Hi,
    After upgrading to iOS7, I was asked by the system to set an passcode.
    When i try to swipe from the notification area, it navigates me to the passcode lock screen which is expected but the same behaviour is not shown for a call - when i swipe from my notification area for the missed call it allows me to make calls.
    Is this a bug or expected behaviour? Why there is a different behaviour for different functionalities? Its just to confuse the users?

    It sounds as if you only had one line with an upgrade available. So you can only upgrade one line. For you to upgrade as well, you will have to wait until your upgrade is available. You can check that at MyVerizon. That's just how it works. All carriers and phone brands are the same. I have to wait until February to upgrade. The only thing you can do to get the new iPhone, is add a new line. But then you're paying for a line you don't need.

  • How can I start a client Application from a procedure?

    Hello, can someone help me to solve this problem?
    I've written a client Application.(just one file Client.java) Then I created a .jar file for my applicaiton component and loaded it to the server using loadjava. (MyExample.jar)
    It should be invoked by a procedure, which I've created.
    create or replace procedure TEST as language java name 'MyExample.main(java.lang.String[])';
    But when I want to start it in the SQl*Plus using "call TEST();", I received the message:
    Executing PL/SQL: CALL COSMOS."JDEV_TMP_PROC_1"()
    ORA-29541: Klasse COSMOS.CompUpdateClient konnte nicht aufgelöst werden
    ORA-06512: in "COSMOS.TEST", Zeile 0
    ORA-06512: in "COSMOS.JDEV_TMP_PROC_1", Zeile 3
    ORA-06512: in Zeile 1
    Process exited.
    Can someone tell me why and how I can solve it?
    Thanks
    Lucia

    As Andrew suggested, it might be an issue with broken java installation on your system.
    You could try performing following steps to see if you get similar results. This will verify if there is something with your java installation or something to with the way you coded your java class(es).
    (since you did not post the code, I'm not sure which one might be a problem.
    SQL> create or replace and compile java source named "Hello" as
      2  import java.lang.* ;
      3  import java.util.* ;
      4
      5  public class Hello
      6  {
      7    public static void Say()
      8    {
      9     System.out.println("Hello World in Java!") ;
    10    }
    11  }
    12  /
    Java created.
    SQL>
    SQL> create or replace procedure Hello_Java is
      2  language java
      3  name 'Hello.Say()' ;
      4  /
    Procedure created.
    SQL> show errors
    No errors.
    SQL>
    SQL> set serveroutput on size 100000
    SQL> exec dbms_java.set_output(100000) ;
    PL/SQL procedure successfully completed.
    SQL> exec Hello_Java ;
    Hello World in Java!
    PL/SQL procedure successfully completed.
    SQL>

  • Can I know the caller method from callee

    Hi,
    I have a method which is called from multiple methods. Is it possible to know the method which called it wihtout sending the parameter to specify which method called it. i.e. without using something like send 1 for method 2 for other.
    One way I thnk is build an exception. Throw & catch it in the same method & get the stackTrace();

    I would respectfully remark that it isn't your
    method's job to police the callers. It still
    shouldn't be concerned with who the caller
    was. It should just throw an appropriate exception
    indicating invalid parameters were passed. Then it's
    the caller's responsiblity to do something about it.Yeah... that is why exceptions exist. Throw an IlegalArgumentException and then (since it's unchecked) if you want to watch out for it, watch for it in the calling method, which is after all the method in charge.
    It is easy to get carried away with the "spot checking" philosophy and try to handle all errors exactly where they occur, but if you think about it, where did the error really occur? Up the stack at the caller.. that is where the bad arguments came from.
    Also, strictly speaking, it should be a rare case when code throws an IllegalArgumentException. For the most part exceptions should represent just that - exceptions. It is not really in best form for them to be used as conditionals.
    For example, instead of getting input from the user and then forcing it down the method's throat without checks, you should run your own checks on it first - for example, by telling the JTextField that it is not allowed to accept characters that would result in an IllegalArgumentException.
    Exceptions should represent just that; hence, except for certain weird cases, a body of classes that you write that interact exclusively with each other should be designed to (almost) never throw exceptions.
    When someone else starts using your classes, all bets are off.
    Drake

  • Crystal Report with Optional Parameters from Stored Procedure

    I have a client who created a Crystal Report. This report is linked to a Stored Procedure which allows for input on two criteria. Both of these critera are static values. However, the second of these parameters is setup to allow the user to enter up to 20 values. For example, the Stored Procedure needs the CARDCODE, and a set of DOCUMENTS. So the parameters/prompts would look like this...
    BP CardCode:
    Document1:
    Document2:
    Document3:
    ...etc...
    The report will just display basic document information for those documents that were entered.
    With 8.8, these parameters were changed to be REQUIRED.... not OPTIONAL. According to SAP note 1500777, this is a known bug and will be fixed in future versions. This note also states to change the criteria for the filter. However, when using a Stored Procedure, this does not appear to be an option, as the selection is defined by the data connection (and the parameters defined in the SP).
    Am I missing something? Is there a way to make the suggetion in the above note work with my Stored Procedure?
    Or, is there another way to make these parameters optional? (Do I need to change the SP?)
    Thanks!
    ~ terry.

    I have a client who created a Crystal Report. This report is linked to a Stored Procedure which allows for input on two criteria. Both of these critera are static values. However, the second of these parameters is setup to allow the user to enter up to 20 values. For example, the Stored Procedure needs the CARDCODE, and a set of DOCUMENTS. So the parameters/prompts would look like this...
    BP CardCode:
    Document1:
    Document2:
    Document3:
    ...etc...
    The report will just display basic document information for those documents that were entered.
    With 8.8, these parameters were changed to be REQUIRED.... not OPTIONAL. According to SAP note 1500777, this is a known bug and will be fixed in future versions. This note also states to change the criteria for the filter. However, when using a Stored Procedure, this does not appear to be an option, as the selection is defined by the data connection (and the parameters defined in the SP).
    Am I missing something? Is there a way to make the suggetion in the above note work with my Stored Procedure?
    Or, is there another way to make these parameters optional? (Do I need to change the SP?)
    Thanks!
    ~ terry.

  • Droid X can't make/receive calls/texts from home

    I've been experiencing problems with my phone for about 2 days now. I can't use it to make calls or texts and I don't get any from anyone either. If I literally drive 2 miles down the road, the phone works. I've tried to reset it using *228 and update the roaming settings. I've taken the battery out while the phone is on, and even manually powered it down, but nothing works. The phone shows I have full signal strength until I actually make a call, then the bars disappear and the call never connects. The same thing happens when I try to send a text; it just never sends. I can connect to the internet, so there's no problems there. I appreciate any help.

    Hello chinesesnowplow
    Wow! That's very upsetting not being able to call or text from your home. Let's get to the bottom of this immediately.
    Are you still experiencing the issue? Are there any other devices having this same problem in your home? Did this start after a particular application was downloaded? Please place the device in airplane mode. Go to Menu> Settings> Wireless & network settings> then check mark airplane mode until the signal changes. Then uncheck airplane mode and retest.
    Please let me know if this helps, if not I would be glad to further troubleshoot with you.
    Thank you
    JoeL_VZW
    Please follow us on twitter @vzwsupport

  • Calling a procedure from another procedure

    Hi All,
    I have a procedure dept_details which gives the following output.
    <header>
    <dept_details>
    <dept>
    <deptno>10<deptno>
    <deptname>ACC</deptname>
    </dept>
    <dept>
    <deptno>20<deptno>
    <deptname>HR</deptname>
    </dept>
    </dept-details>
    </header>
    I have another procedure named emp_details which gives the following output.
    <header>
    <emp-details>>
    <emp>
    <empno>123</empno>
    <empname>ABC</empname>
    </emp>
    <emp>
    <empno>234</empno>
    <empname>DEF</empname>
    </emp>
    </emp-details>
    </header>
    I am now trying to create another procedure making use of the exiusting procedures and its output must be in the following format
    <header>
    <dept_details>
    <dept>
    <deptno>10<deptno>
    <deptname>ACC</deptname>
    </dept>
    <dept>
    <deptno>20<deptno>
    <deptname>HR</deptname>
    </dept>
    </dept-details>
    <emp-details>>
    <emp>
    <empno>123</empno>
    <empname>ABC</empname>
    </emp>
    <emp>
    <empno>234</empno>
    <empname>DEF</empname>
    </emp>
    </emp-details>
    </header>
    thanks
    Sneha

    Hi,
    I have a procedure dept_details which gives the following output.
    <header>
    <dept_details>
    <dept>
    <deptno>10<deptno>
    <deptname>ACC</deptname>
    </dept>
    <dept>
    <deptno>20<deptno>
    <deptname>HR</deptname>
    </dept>
    </dept-details>
    </header>
    I have another procedure named emp_details which gives the following output.
    <header>
    <emp-details>>
    <emp>
    <empno>123</empno>
    <empname>ABC</empname>
    </emp>
    <emp>
    <empno>234</empno>
    <empname>DEF</empname>
    </emp>
    </emp-details>
    </header>
    I am now trying to create another procedure making use of the exiusting procedures and its output must be in the following format
    <header>
    <dept_details>
    <dept>
    <deptno>10<deptno>
    <deptname>ACC</deptname>
    </dept>
    <dept>
    <deptno>20<deptno>
    <deptname>HR</deptname>
    </dept>
    </dept-details>
    <emp-details>>
    <emp>
    <empno>123</empno>
    <empname>ABC</empname>
    </emp>
    <emp>
    <empno>234</empno>
    <empname>DEF</empname>
    </emp>
    </emp-details>
    </header>
    Here,the header has to be removed initially for procedures 1 and 2 after calling it into procedure 3 then these two outputs have to be cancatenated and then wrap them in a header to get
    <header>
    <dept_details>
    <dept>
    <deptno>10<deptno>
    <deptname>ACC</deptname>
    </dept>
    <dept>
    <deptno>20<deptno>
    <deptname>HR</deptname>
    </dept>
    </dept-details>
    <emp-details>>
    <emp>
    <empno>123</empno>
    <empname>ABC</empname>
    </emp>
    <emp>
    <empno>234</empno>
    <empname>DEF</empname>
    </emp>
    </emp-details>
    </header>
    Thanks

  • Call WS from stored procedure (Oracle)

    Hi All
    I have scenario: JDBC - XI - RFC. It works fine.
    Now I want to change it to SOAP - XI - RFC.
    I can take wsdl url in Sender Agreement.
    I can test it from Web Services Navigator - it is ok.
    Can I send message from Oracle using soap_api? Give me a sample plz
    Regards,
    Andrey.

    you need a custom application which can read DB and send the data to XI through exposed webservice.
    The custom application can be implemented in any language such as JAVA, C/C++, NET etc..........

  • Can I delete individual caller names from my call history?

    Is it possible to delete individual caller names on my call history? Ive been trying but everytime I highlite the name to delete, it ends up calling the number. IS this an avaialble feature? Thihs is pretty elementary but I hope somebody can help me.

    Oh good theres other people who have had the problem as me I either just rename the contact or just say the iPhone crashed and had to restore it and hence the list is empty

  • How can i call my function from a procedure?

    My function is:
    create or replace FUNCTION test(pAttributeName IN NUMBER)
    RETURN VARCHAR2 IS
    ret VARCHAR2(100) := NULL;
    VAR n1 NUMBER
    BEGIN
    SELECT Klartext INTO ret FROM piclist WHERE ATTRIBUTNAME = 'voltage_level' and PICLIST_ID =pAttributeName;
    RETURN ret;
    Insert into BM_ATTRIB(ID_ERFASSUNG,ID_ATTRIBNAME,ATTRIB_CHA,BM_ATTRIB_ID) VALUES(1,1,ret,1);
    exception
    when no_data_found then
    ret := 'AAA'   ------- you can return any default value,if you like
    --return ret;
    return NULL;
    when others then
    dbms_output.put_line('Exception:'||sqlerrm);
    End;
    I want to call it from a procedure!
    Please help!
    Nicole

    if the function is in the same package as the procedure then merely specify the function name and parameters:
    retcode := functionname(param1..paramn);
    If in another package then:
    retcode := packagename.functionname(param1..paramn);
    If the function is in another schema then you need to grant execute rights to the package/function to the schema trying to run the function:
    grant execute on packagename/functionname to otherschema;
    you need to be the package/function schema owner to do the above grant.

Maybe you are looking for

  • Hierarchical filter in Web Reporting

    Hi, I'm working with BI 7.0 SPS13 and the problem is the hierarchical filter displays every characteristic node using a very long text linking every attribute of the base characteristic along with it's values. For example: Gcia.Tecnica, Ind gpo.compr

  • Magic Mouse Scroll Fail

    Hi, I have just bought a Magic Mouse, and am trying to install it. My MBP recognizes it, I can move the cursor and have use of the buttons, however I cant scroll. At All. When I go into System Preferences>Mouse, I only have two sliders, Tracking Spee

  • Why doesn't my square move...

    can someone help me find why my square doesn't move down the page? import java.applet.*; import java.awt.*; public class ShapeTest extends Applet implements Runnable Dimension bgWidthHeight; Image buffImage; Graphics buffGraphics; Thread firstThread;

  • Error -195067903​5 When Using the LabVIEW Shared Variable

    While communication of PLC & labview 2014 SP1 via modbus ethernet I am getting continuously Error -1950679035 as per attachment. Also distribution manager system is not responding while expanding of shared variable library. And it is not showing list

  • AirPort can"t be installed on this disk. The version of Mac OS X on this volume is not supported. Can anyone help me out?

    AirPort can"t be installed on this disk. The version of Mac OS X on this volume is not supported. Can anyone help me out?