can we call a procedure in the service?

Is that what we call a function procedure?

If so, please explain with example.

Thank you
Aman

Why don't you try it?

SQL> set serveroutput on
SQL> declare
  2   procedure p1 (
  3    i1 in out number
  4   )
  5   as
  6   begin
  7    i1 := 200;
  8   end p1;
  9   function f1
 10   return number
 11   is
 12    l1 number;
 13   begin
 14    p1(l1);
 15    return l1;
 16   end f1;
 17  begin
 18   dbms_output.put_line(f1);
 19  end;
 20  /
200

PL/SQL procedure successfully completed.

SQL> set serveroutput off

Tags: Database

Similar Questions

  • Can we call a procedure in the select statement?

    Can we call a procedure in the select statement?

    Hello

    Raghu_appsdba wrote:
    Can we call a procedure in the select statement?

    # You can call functions, but not procedures.

    If the procedure does not change the State of the database (for example, it isn't updated all tables), then you can wrap it in a function, or re - write function.

    Here is an example of wrapping.

    CREATE OR REPLACE FUNCTION fun_x (in_txt IN VARCHAR2)
    RETURN  VARCHAR2
    IS
    BEGIN
            proc_y (in_txt);
            RETURN  in_txt
    END     fun_x;
    
  • Call stored procedures in the object module and application of entity

    Hello

    I've implemented a helper methods that contains the EntiyImpl base class to call stored procedures.

    Now, I need to call procedures stored from the module of the application.

    Apart from the creation of a module base class asks and the programme of assistance of duplication of code in the method is possible
    to share methods of assistance for calling stored procedures between the entity impl and application module impl?


    Concerning
    Paul

    Support code depends on characteristics of an object instance given entity beyond its database transaction?

    If so, I'm not sure I see how it could be used with a class of application module.

    Otherwise, here's what you do:

    Step 1:

    Set up the database transaction - you can even choose to. So instead of

    {myHelperMethod (Object someParam) protected
    DBTransaction trans = getDBTransaction();
    ...
    }

    This is for change

    protected myHelperMethod (DBTransaction trans, someParam Object) {}
    ...
    }

    Step 2: make the method public and static - once you set DBTransaction, you should be able to do.

    public static myHelperMethod (DBTransaction trans, someParam Object) {}
    ...
    }

    Step 3: Remove your EntityImpl base class method in a utility class:

    Public MustInherit class PlSqlUtils {}
    private PlSqlUtils() {}

    public static myHelperMethod (DBTransaction trans, someParam Object) {}
    ...
    }
    }

    When you call the method of application module, object entity or class of same view object, call

    PlSqlUtils.myHelperMethod (getDBTransaction (), paramValue);

    Unlike Transaction.executeCommand (), allows you to provide features like the setting procedure of parameter values, recovery of the values of the parameters, etc.

    Hope this helps,
    Avrom

  • When I opened a project I can't call to connect to the server

    When I opened a project I can't call to connect to the server.  I see the green arrow and click but there is no link - the green bar with show doent IP etc and I can not connect with the mobile app

    I have tried phonegap since since updated to win 10 - it seemed to work - at least I could see with Windows 8.1

    Thanks in advance

    I found that if I turn off the personal settings of microsoft firewall, it works.  Can always leave external on

    Thanks for the research!

  • calling a procedure in the loop

    I just want to know one thing:

    I call a procedure with the following parameters

    DECLARE

    PROFIT_CENTER NUMBER ;

    START

    PROFIT_CENTER : = 1109--(de même, je fais tourner le proc pour 5 profit_centers plus 1123,1132,1122,3211,1111 un par un en passant les valeurs manuellement, il prend près d'une minute pour chaque centre de profit)

    Prc_test_calc () PROFIT_CENTER);

    COMMIT;

    END;

    For each proc profit_center takes 1 minute (approx.) time.

    But when I'm putting loop to call the procedure for each profit_center, I don't know why it takes too long for each profit_center

    Please let me know is there something wrong with the loop below

    DECLARE

    PROFIT_CENTER NUMBER ;

    cursor c_profit is

    Select separate PROFIT_CENTER de plng_pc profit_center in ()1109 1123,1132,1122,3211,1111)-Plng_pc is a table where profit_center information is obtain from

    START

    For pc_rec in c_profit

    loop

    Prc_test_calc (  pc_rec . PROFIT_CENTER );

    COMMIT;

    End loop;

    END;

    Could you please sugget me if something goes wrong?

    Hello

    as suggested, have you checked the query for the cursor loop and have you tried the process with no cursor loop.

    Concerning

    André

  • Can we call a procedure defined in a procedure in AM itself AM?

    Dear members,

    I just want to know is there a way standard oracle to call a procedure defined in AM since another procedure defined in the same AM. For example

    AM Code:_

    Public Sub proc1()
    *{*
    System.out.println ("IAM IN PROCEDURE-1");
    *}*

    Public Sub proc2()
    *{*
    PROC1;
    *}*

    Please please let me know if the above coding style is according to standards or not.

    Thanks in advance.

    Best regards
    Arun D. Reddy

    Arun,

    As Ravi mentioned this way to call the method is correct.
    PROC1() could be reusable it is why you call again.

    Sometimes a few methods (procedure) is frequent use on the module.
    In this case, you can have the method in a commonAM and you extend the commonAM in all your AMs
    who will help you compose in all AM having a central place to call.

    Thank you

    With respect,
    Kali.
    OSSI.

  • Competitive access Manager - calling a procedure on the external database

    Hello

    I have a job that must be planned, but also has an option to be run on demand. This work calls a procedure that resides on a package on a database server that is different from the server of E Business Suite database. (This procedure fills the Oracle Interface tables)

    As I understand it, I need to create a DBLink of EBS to my database and a DBLink to my database at EBS. Is it possible to call a routine that is located on an external database?

    Thank you
    Stephen

    This can be achieved by the following-

    1 create a link of db of the database of the EBS at the remote database using a schema that has the necessary privileges to run the package code.
    2. create a synonym in the basis of EBS pointing to the code in the package to the remote database.
    3. enroll in a program of concurrent running the synonym.
    4. run simultaneous program on planned or adhoc basis.

    HTH
    Srini

  • Call a procedure in the application. Frank please check this box

    Hello

    I hv download screen connection on the following site. Now, I'm trying to connect even with my database. I have this hv the field password of the application as previously only username is available in the user interface.

    [http://blogs.oracle.com/shay/simpleJSFDBlogin.zip]

    The problem is that my password of database field is protected by encryption of integrated oracle. There is a procedure I hv in the database for the encryption of the password. How can I call the procedure in the application? In the application I hv submitted business components and I hv attached procedure in demand as' database offline"I hv to fix each source database like this? is this right way that I followed to call the procedure?

    Please guide me

    Thanks in advance

    Dounya.

    Hello

    Take a look at the guide to the developer of the call of stored procedures and functions. Rather than base the query for the form of connection on a VO, you use a stored procedure function in a client method exposed on the VO or AM

    http://download.Oracle.com/docs/CD/E12839_01/Web.1111/b31974/bcadvgen.htm#sm0297

    Frank

  • Can I call a function using the array index?

    I defined a table that stores the name of the function, like this:

    var aresetButtonTop:Array = new Array(resetTop1,resetTop2,resetTop3,resetTop4,resetTop5);

    Then I have a button named "btnresetTop" which, once clicked will be called one of the five functions stored in the array (aresetButtonTop) above. Functions are called at runtime depending on certain conditions. I need to figure out how I can call these functions using the array index. I use the following code to call the function. The value of i has already been calculated.


    btnresetTop.addEventListener (MouseEvent.CLICK, aresetButtonTop [i]);

    After doing this, I get the following error when I click on the button:

    TypeError: Error #2007: parameter listener must be non-null.
    at flash.events::EventDispatcher/addEventListener()
    at gallerytest_fla::MainTimeline/thumbTopClick()

    Note: thumbTopClick() is a function within which all these codes are written.

    I need to know if it is posible in AS3 to call a function name using array index or not. If so, could you afford ehelp me out.

    You can certainly do.

    In your case, it looks like i is out of range. Show your loop.

  • How can I call two functions in the HTML Form element attributes

    Hello

    I want the same value in the text field two, when I select the value to select the list then the value with a number increment should be two text field.
    I use both java script

    < script >
    function sumItems() {}
    function getVal (item) {}
    If ($x (point) .value! = "")
    Return parseFloat ($x (item) .value);
    on the other
    return 0;
    }
    $x('P19_LAST_END_YR').value = getVal ('P19_LAST_STR_YR') + 1;
    }
    < /script >


    < script >
    function per1Items() {}
    function getVal (item) {}
    If ($x (point) .value! = "")
    Return parseFloat ($x (item) .value);
    on the other
    return 0;
    }
    $x('P19_LAST_END_YR').value = getVal ('P19_START_YEAR') + 1;
    }
    < /script >


    now how can I call function onchange two attributes of the element in the HTML form for the discount:
    ' onChange = "javascript:sumItems()" onChange ="javascript:per1Items().

    Hello

    Try

    onchange="sumItems();per1Items();"
    

    BR, Jari

  • can we call form thanks to the tree?

    Hi all
    I Googled it but I can not find something good that the way to call the form thanks to the tree?
    can someone guide me?


    Sarah

    If its still a form fixed, you want to call, you can change the code to

    DECLARE
    vcValue VARCHAR2(60):=FTree.GET_TREE_NODE_PROPERTY('BLOCK.TREE', :SYSTEM.TRIGGER_NODE, ftree.NODE_VALUE);
    BEGIN
    CALL_FORM('W');
    END;
    

    But I suppose that you also want to pass a context to the form called. Maybe this helps http://andreas.weiden.orcl.over-blog.de/article-28180655.html

  • How 2 call a procedure with the data type for the parameter Ftree.NODE

    Hello

    in this link
    http://Andreas.Weiden.ORCL.over-blog.de/article-29307730.html


    Down in the page after you run the package, I created the procedure and it compiled successfully but when call PR_WTNS in trigger WHEN-TREE-NŒUD-SELECTED

    PROCEDURE PR_WTNE (i_ndNode IN Ftree.NODE);

    as

    PR_WTNE (i_ndNode Ftree.NODE);


    I got the error message; A wrong number or types of argument in the call

    pls I'm stuck can help any one?


    Kind regards

    Abdetu...

    Published by: Abdetu on October 24, 2010 02:36

    Published by: Abdetu on October 24, 2010 02:36

    YKou have to give a variable of type Ftree.NODE when calling this function. If called fromm a WHEN-TREE-NODE-SELECTED-trigger, use: SYSTEM. TRIGGER_NODE

  • Call stored procedure in the URL

    Hi all

    How to call a stored procedure 4 Apex in the URL. The error is less.

    The requested URL/apex/EXAMPLE. TESTPROCEDURE was not found on this server.

    Thank you.

    802263 wrote:
    Hi all

    How to call a stored procedure 4 Apex in the URL. The error is less.

    The requested URL/apex/EXAMPLE. TESTPROCEDURE was not found on this server.

    Thank you.

    Should work on the assumption that:

    1. the scheme of analysis can 'see' the object such as defined by synonyms, etc.
    2. the schema of analysis has execute privs on the object.

  • How to call stored procedures in the OPS

    Hi all

    I n PageUser enter the date and the code, I need to pass those 2 values to my back-end procedure

    name of procedure xxx_opp_rnv (id varchar2, varchar2 valid);

    I am writing this callable statement in am

    ' public void xxcrm_qtn_revison (String opid, String qtnvalidate) {}
    System.out.println ("values" + opid + "" + qtnvalidate);
    String x = "to_date ('" + qtnvalidate + "',' HH24:MI:SS MON-DD-YYYY')"; "
    System.out.println ("The value of x is..." + x);
    try {}
    System.out.println ("' with in the callable statement" ");
    CallableStatement cs is this.getOADBTransaction ().
    getJdbcConnection () .prepareCall ("{call xxcrm_revison_qtn(?,?)}");
    cs.setString(1,opid);
    cs.setString(2,x);
    DSI Execute();
    DSI Close();
    }
    catch (SQLException e) {}
    System.out.println ("exception is" + e);
    }

    }


    the procedure is not executed

    in my creation valid page is that the datatype element is of type dateTime

    I need to pass the id as a string, and valid as Datetime data types to my callable statement

    How is - this posible


    Concerning
    Anthony

    Hello

    Use this code... pass the qtnvalidate as it is...

    donot use String x = "to_date ('" qtnvalidate "", "DD-MON-YYYY HH24:MI:SS'" ")"; "

    ' public void xxcrm_qtn_revison (String opid, String qtnvalidate)

    {
    try {}

    System.out.println ("' with in the callable statement" ");
    CallableStatement cs is this.getOADBTransaction ().
    getJdbcConnection () .prepareCall ("{call xxcrm_revison_qtn(?,?)}");
    cs.setString(1,opid);
    cs.setString(2,qtnvalidate);
    DSI Execute();
    DSI Close();
    }
    catch (SQLException e) {}
    System.out.println ("exception is" + e);
    }

    }

    Now, in the procedure, you can convert the string to a date time

    name of procedure xxx_opp_rnv (id varchar2, varchar2 valid);

    validdate: = to_date (valid, "HH24:MI:SS MON-DD-YYYY)";
    OPID: = to_number (id);

    Try first to print in jdeveloper, what is the format of date time and therefore change the format

    Thank you
    Gerard

    Published by: Gauravv on September 10, 2009 04:16

  • 11.0.09 Acrobat can´t use certificates received by the Services of Certification AD more

    Hallo,

    I have the following problem:

    After the 11 of Adobe Acrobat and Adobe Reader 11 update, I can´t use digital signatures from Services of Certification Active Directory. In previous Versions, it worked without any problem.

    Now, if I m trying to place my signature, I wonder about the location of my existing digital signature. But no matter what I select I m not able to use my signature of Certificate Manager.

    In the past he didn t ask anything, but just to let me use my signature.

    Thank you in advance.

    Andi

    Hey Andi,

    Beginning with version 11.0.9, that we started to filter the available digital IDs, based on the extended key usage (EKU) extension. If there is an extension EKU certificate must contain either; 'email Protection', 'Code Signing' or any object OID (2.5.29.37.0).

    It's what I look at first is perhaps that it is a question EKU.

    Steve

Maybe you are looking for

  • Satellite Pro A60 crashed during the update of the BIOS

    Updating to BIOS ver 1.70 to 1.90 (from Windows XP) my Satellite Pro A60 off without any warnings. After about 5 minutes of waiting I went it. And... computer just several beeps and stops again.Anyone has idea what it means? Is it possible to turn it

  • NUMBERING lost FAST

    Speed dial when installed lost 5.0. How can I return to 4.0?

  • Battery on Satellite L50-A00M problem

    Hello I would like to just a few comments on the expected useful life of the battery on my C50-A00M.The computer is a little more than 2 years. It can't hold a charge, and the health assessment aboard Toshiba tells me to replace it.Is it by for the c

  • Recycle Bin problems

    I deleted the program Wizard101 and I need to go over the icon. I already removed it from the trash. Is it possible to cancel that? And also I tried to download the program again. The icon will not be displayed.

  • Fix KB981013 self extractor PW invalid

    I ask hoftix to KB981013 Vista Ultimate x 64 SP2I used this fix in the past without problems. (16/11/2010)I downloaded the file several times and even tried 3rd party extraction tool (7zip)but the password provided is invalid. To test other factors,