In SQLScript, how to use EXEC to call another procedure with parameters in procedure?

Hi experts,
In SQLScript, How to use EXEC to call another procedure with input and output parameters in procedure?thanks very much

Hi Sagar,
thank you! I generate another procedure with an input parameter and an output parameter in a procedure. Then i need to call the generated procedure using EXEC. Here is my code:
create procedure ftest1(out sum_num bigint)
as
begin
declare fa_output bigint;
declare v_sql_drop varchar(200);
declare v_sql varchar(500);
declare cursor c_cursor1 for select num from TABLE1;
--v_sql_drop := 'drop procedure fe';
--exec v_sql_drop;
v_sql := 'create procedure fe(in i_num bigint,out o_num bigint) as begin';
v_sql := :v_sql || ' o_num := :i_num * 2 + :i_num * :i_num;';
v_sql := :v_sql || ' end';
exec v_sql;
open c_cursor1;
for c_item as c_cursor1 do
exec 'call fe(c_item.num,o_num=>fa_output)';
if sum_num is null then
sum_num := fa_output;
else
sum_num := :sum_num + fa_output;
end if;
end for;
close c_cursor1;
end;
The underline code is using exec to call the generated procedure. But this method cannot work. Any suggestion? thanks again!

Similar Messages

  • How to use @jws:sql call Stored Procedure from Workshop

    Is there anyone know how to use @jws tag call Sybase stored procedure within
    Workshop,
    Thanks,

    Anurag,
    Do you know is there any plan to add this feature in future release? and
    when?
    Thanks,
    David
    "Anurag Pareek" <[email protected]> wrote in message
    news:[email protected]..
    David,
    In the current release, we do not support calling stored procedures from a
    database control. You will have to write JDBC code in the JWS file to call
    stored procedures.
    Regards,
    Anurag
    Workshop Support
    "David Yuan" <[email protected]> wrote in message
    news:[email protected]..
    Anurag,
    I know how to use DB connection pool and create a db control with it. In
    fact, we have created a Web Service with the db control using plain SQL
    in
    @jws:sql. However, my question here is how to use @jws tag in Weblogic
    Workshop to create a Web Services based on Sybase stored procedure orany
    Stored Proc not plain SQL.
    Thanks,
    David
    "Anurag Pareek" <[email protected]> wrote in message
    news:[email protected]..
    David,
    You can use a database control to obtain a connection from any JDBC
    Connection Pool configured in the config.xml file. The JDBC Connectionpool
    could be connecting to any database, the database control is
    independent
    of
    that.
    Regards,
    Anurag
    Workshop Support
    "David Yuan" <[email protected]> wrote in message
    news:[email protected]..
    Is there anyone know how to use @jws tag call Sybase stored
    procedure
    within
    Workshop,
    Thanks,

  • How to Use Exec function in Java Code

    How to Use Exec method
    I want to Execute command
    net Start "some service"
    using exec method of runtime class
    or i use some other way if suggest

    Assuming you have read http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#exec(java.lang.String) already, I can only suggest to be more specific in what your problems are. If you are after just some example code, then download ftp://ftp.ebi.ac.uk/pub/software/textmining/monq/monq.tar.gz and have a look at the source code of monq.stuff.Exec. It does all those things which are necessary to keep track of a Process after it was created with exec.
    Harald.
    BioMed Information Extraction: http://www.ebi.ac.uk/Rebholz-srv/whatizit

  • How to use the program called ZSAPLINK to import Function Name

    How to use the program called ZSAPLINK to import Function Name

    Not sure why you posted into this forum?
    Note the header for this forum:
    This forum is dedicated to all other development-related questions which are not directly addressed by other forums. This includes Business Objects SDKs, products, or technologies which do not fall under BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server, or Crystal Reports (for example Desktop Intelligence SDK, Universe Designer SDK, Portal Integration Kits, Java User Function Libraries, and other third party technologies or development languages).
    Ludek

  • How to use three way calling

    How do you end a call after you've merged it for three way calling?

    Hi there, there is no star function to activate the three-way calling feature.  Here is a very helpful link that will explain on how to use three-way calling with Verizon. 
    http://www22.verizon.com/ResidentialHelp/Phone/Calling+Features/Three-Way+Calling/Questions+and+Answ...
    --James
    --James
    Verizon Support
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or Plan.

  • How to use "Set Enterprise Call Info" step in the script ?

    Hi all
    Can anyone please suggest how to use "Set Enterprise Call Info" step in the script.
    Does anyone has any example script with the same (a complete example script) ?

    Hi
    go to this guide
    http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/uccx70edgs.pdf
    and see the chapter
    "Designing Scripts for use with the Cisco Application Gateway"

  • How to use GUI_EXEC to call a bat file with 3 varibale paremeters

    HI Experts,
    I would likd to call a.bat with parameters. however these parameters are varibles.
    for example i need call a.bat with the current system ID current hostname and system number. I do not think my writing is right...
    CALL FUNCTION 'GUI_EXEC'
      EXPORTING
        COMMAND          = 'D:\restart.bat'.
      PARAMETER        = SY-SYSID ' ' SY-HOST '50'
    Best regards,
    Cliff

    Hi,
    Your bat should look like this...
    yourcommand %1 %2 % 3
    ...and abap code like this...
    DATA:  l_cmd(30) TYPE c.
    MOVE 'D:\restart.bat' TO l_cmd.
    MOVE SY-SYSID  TO l_par1 .
    MOVE SY-HOST  TO l_par2.
    MOVE '50' TO l_par3.
    CONCATENATE l_cmd l_par1 l_par2 l_par3 INTO l_cmd SEPARATED BY SPACE
    CALL FUNCTION 'GUI_EXEC'
    EXPORTING
    COMMAND = l_cmd.
    Edited by: Simo Mertsola on Sep 27, 2009 7:28 PM
    Edited by: Simo Mertsola on Sep 27, 2009 7:28 PM
    Edited by: Simo Mertsola on Sep 29, 2009 3:20 PM

  • Req any examples of how to use a USB midi controller​/keyboards with Labview TIA

    Req any examples of how to use a USB midi controller/keyboards with Labview TIA

    Hi,
    To access the MIDI ports you will need to call the Windows SDK. To send MIDI commands is relatively easy, here is an example that shows you how to send data to a MIDI controller or keyboard.
    As far as input goes, this is the hard part. There are a series of functions that you need to call to open up the device, set some buffers and and possibly a callback to get notifications on the incoming data.
    Reading MIDI data will not be an easy task, your best bet will be to implement this in a DLL and call that DLL in LabVIEW, there should be some code available o the web.
    = "http://msdn.microsoft.com/library/default.asp?url​=/library/en-us/multimed/htm/_win32_multimedia_... is a link to the Windows multimedia functions that you could use for MIDI input.
    Let me know if you have any further questions.
    Regards,
    Juan Carlos
    N.I.

  • Two related questions: using htmldb_Get to call stored procedure and passing in an array of items

    I have the need to save dynamically generated ApEx items via AJAX.  I am using APEX_ITEM API to generate the items.  At run-time, I have no idea how many of items will be generated on the page, but I know that they will all have discreet and distinct "name" attributes, i.e. f01, f02, f03, etc.  As a basic example, if I have to generate a select list, I know that the "p_idx" parameter of the APEX_ITEM call is say "3", so all select lists that get generated will have a "name" attribute in the DOM of "f03", all text items will be "f01", etc.
    I want to save this data to the database via AJAX.  It is typical to call the standard htmldb_Get javascript function for use of an on-demand process, but I am interested in using the rarely-called-upon "procedure" and queryString" options of that javascript function so that I can build the queryString on the fly based on what is on the DOM when the tries to save the data they entered into these APEX_ITEM-generated items.  Does anyone have any good examples of how to use the "procedure" and "queryString" parameters of the htmldb_Get javascript function?
    I have found a smattering of some blogs, posts, etc. online related to this, but mostly just people regurgitating the documentation.  I found this post (https://forums.oracle.com/thread/2549237) which had a glimpse of hope to be able to pass an array (which is something I will need) as a parameter, but would like someone to sanity check this before I go down that road.
    Shane.
    ApEx 4.2.1

    Shane
    Since you mention you are on APEX 4.2  I would recommend using apex.server.process which is the documented replacement of the officially undocumented htmldb_Get.
    In the documentation it is set that the first parameter is the ajaxidentifier but it actually is the process name.
    The data object would be something like
    var lData ={f01 : get_value_array('f01')}
    Where get_value_array is
    function get_value_array(pColumnName) {
      var l_values =[];
      apex.jQuery('[name="'+pColumnName+'"]').each(
       function(){
        var l_value;
        l_value = apex.item(this.id).getValue();
        l_values.push(l_value);
      return l_values
    For a working example see this demo.
    Nicolette

  • How to call PDF Report with parameters in jdeveloper 10.1.3

    Hi all,
    how to call PDF Report with parameters in jdeveloper 10.1.3
    for example I have Report name is repdept.pdf with parameter as deptno
    and I want call this Report from JSP page ?
    thanks
    frank

    Hi all,
    how to call PDF Report with parameters in jdeveloper 10.1.3
    for example I have Report name is repdept.pdf with parameter as deptno
    and I want call this Report from JSP page ?
    thanks
    frank

  • How to use bind variables in this procedure

    Hi Experts,
    How to use bind variables in this procedure for static queries.
    PROCEDURE DELETE_MER_PROC (M_id IN NUMBER)
    IS
    BEGIN
    V_date DATE;
    SELECT PD_DATE INTO v_date FROM PD_MAINTAIN;
        DELETE FROM MER_CLEAR
        WHERE MER_DT < v_date
        AND ID = M_ID;
    COMMIT;
    END;   
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    Please help me.
    Thanks.

    976208 wrote:
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    You cannot avoid hard parsing - as the 1st time a SQL statement (like the SELECT or DELETE statements in your code) is encountered, it does not reside in the server's Shared Pool, and needs to be added into the pool via a hard parse.
    Bind variables does not prevent hard parsing. Hard parsing happens when the SQL statement (with or without bind variables) is a brand new statement encountered by the server.
    Bind variables enables the same SQL cursor to be reused, by simply changing the bind variable value.
    Not using bind variables means that each SQL statement is unique and not shareable - as the value is hardcoded into the statement and cannot be changed via a bind value. This typically means LOTS of different SQL statements (where the only difference is the changed value in the statement) are created - with each statement being a new statement not seen before in the Shared Pool and needing to be hard parsed.
    One does not design one's code not to be hard parsed. There ALWAYS will be a hard parse in order to get a SQL statement into the Shared Pool. One designs one's code to REUSE cursors in the Shared Pool.

  • How to use order by in stored procedure base block?

    How to use order by in stored procedure base block? I need to change order by dynamically

    Use SET_BLOCK_PROPERTY('BLOCK_NAME',ORDER_BY,'COLUMN_NAME1, COLUMN_NAME2');

  • How to Use SQL Query having IN Clause With DB Adapter

    Hi,
    I am using 11.1.1.5 want to find out how to Use SQL Query having IN Clause With DB Adapter. I want to pass the IN values dynamically. Any ideas.
    Thanks

    invoke a stored procedure, it's safer than trying to put together an arbitrary SQL statement in the JCA adapter

  • How to use 45W MagSafe 2 Power Adapter with cable management MagSafe 2 power port macbook air 2013

    How to use 45W MagSafe 2 Power Adapter with cable management MagSafe 2 power port macbook air 2013 there's two plugs do I use both for the safety to work or I just one ? Thanks sorry new macbook air 2013 was given to my daughter fir her 18th bday 2 days ago by my brother

    No, the one is just an extension cord,          just use the 45W charger with its attached thin cord and connect the magnetic magsafe to to the connector on the back left of the macbook Air for use and charging it

  • How to use temporary interface in another interface as derived table in 10g

    Hi ,
    Can somebody please tell me how to use temporary interface in another interface as derived table in 10g.
    I have an option in odi 11g to this task.But i am working on odi 10g for my project.So that please help me to do this task.
    I can able to create temporary interface in 10g ,but i dont know how to use that temporary interface in another inerface as derived table.
    Thanks in Advance
    Thanks,
    Srikanth A

    A temp interface CANNOT be used as a derived table in ODI 10g.
    All you can do is to drag and drop the temp interface as the source in the mapping.
    PS. Please remember to assign correct/helpful points to the people who help you in the forum.

Maybe you are looking for

  • Is there a plug-in for this?

    We have been using LabPrint software when customers place an order. It already was all of our labs print sizes built in. And it is fairly easy to transfer an order this way between networked computers. Is there a LR plugin somewhere so we could just

  • HT1212 I have forgotten my passcode for ipad and itunes is not "detecting a device in recovery mode."

    I have forgotten my passcode for ipad and itunes is asking passcode to be entered - even after following directions for computers not synced... multiple times, but iTunes is not "detecting a device in recovery mode."  What do I do now?

  • Where are my email attachments?

    I Have an IPad Air. When I receive emails with attachments via my AOL email account I can see , in the new mail list on the left of the screen, that there is an attachment ( the paper clip is there) but when I open the email there is no attachment to

  • Owa_util.calendarprint

    I am trying to create a simple calendar on my app home page. Thought this package would work fine for it but I keep getting the following error: ORA-06550: line 1, column 40: PLS-00103: Encountered the symbol "DATE" when expecting one of the followin

  • How to fix error codes 9808 and 1202?

    I need help fixing error codes 9808 and 1202, can anyone help PLEASE!!!!!