Procedure Doesn't return values

Hello,
I have a stored procedure which has varchar2 as IN and sys_recursor has OUT parameters.
CREATE OR REPLACE PROCEDURE check_values (
     my_values            IN          emp.dept_no%TYPE,
     p_cursor        OUT sys_refcursor
AS
     quoteValues     VARCHAR2 (256);
BEGIN
     SELECT     '''' || REPLACE(my_values, ',', ''',''') || ''''
       INTO     quoteValues
       FROM     DUAL;
     OPEN p_cursor  FOR
          SELECT          emp_no,
                         emp_name,
            FROM     emp
           WHERE     dept_no IN (quoteValues);
END check_values;
/The problem I am facing is in where condition, if I give quoteValues it doesn't fetch me any records when I execute the procedure from sqlplus, but if I am giving
my_values it does fetch me records. I am receiving IN parameters like 9856,9712,8723, so first I put single quote around the emp_no and pass that to where condition.
How can I resolve this issue?
Thanks

user20090209 wrote:
So why then it is not getting executed? if I hard code the above values in where condition it executes fine.Look at your WHERE clause:
WHERE     dept_no IN (quoteValues);How many expressions there are in IN list? Right, only one. So no matter what the value of quoteValues is, that WHOLE value will be compared to dept_no. What you are trying to do can be done via dynamic SQL, LIKE operator or collection.
Dynamic SQL:
CREATE OR REPLACE PROCEDURE check_values (
     my_values            IN          emp.dept_no%TYPE,
     p_cursor        OUT sys_refcursor
AS
     quoteValues     VARCHAR2 (256);
BEGIN
     OPEN p_cursor  FOR
          'SELECT          emp_no,
                         emp_name,
            FROM     emp
           WHERE     dept_no IN (' || my_values || ')';
END check_values;
/ LIKE operator:
CREATE OR REPLACE PROCEDURE check_values (
     my_values            IN          emp.dept_no%TYPE,
     p_cursor        OUT sys_refcursor
AS
     quoteValues     VARCHAR2 (256);
BEGIN
     OPEN p_cursor  FOR
          SELECT          emp_no,
                         emp_name,
            FROM     emp
           WHERE     ',' || my_values || ',' LIKE '%,' || dept_no || ',%';
END check_values;
/ Collection:
CREATE OR REPLACE PROCEDURE check_values (
     my_values            IN          sys.OdciVarchar2List,
     p_cursor        OUT sys_refcursor
AS
     quoteValues     VARCHAR2 (256);
BEGIN
     OPEN p_cursor  FOR
          SELECT          emp_no,
                         emp_name,
            FROM     emp
           WHERE     dept_no IN (SELECT * FROM TABLE(my_values));
END check_values;
/ and pass my_values as sys.OdciVarchar2List('2345','1245','9076').
SY.

Similar Messages

  • Click on a cell in formula doesn't return value, only text. why?

    When doing a simple formula like =c4-c5 in one of my sheets, when i click on the cell, it doesn't return the value, only text.
    What setting do i have enabled/disabled?
    thanks
    hamdog

    HI Hamdog,
    What you are seeing is the formula that is in that cell.
    The setting you have turned on is the first one in the bottom section of the General page of Numbers Preferences. In the English versions, it looks like this:
    With the checkbox unchecked (as mine is), the formula would read:
    =L10-P10
    Column L is labeled "Tips", Column P is labeled "Lenka", Row 10 is labeled "9. 2. 2013"
    To Copy and Paste the result, 462, click (once) on the cell and Copy, then click (once) on the cell where you want to paste the result and go Edit > Paste Values. This should be the seventh item (not including the separator line) in the Edit menu.
    Regards,
    Barry
    Regards,
    Barry

  • [BUG] LOV inside AF:table doesn't return value

    Hi,
    I am using JDEV TP4.
    I have a LOV inside a af:table.
    <af:column sortProperty="LaoId" filterable="true"
    sortable="true"
    headerText="#{bindings.Packstuecke0012.hints.LaoId.label}"
    id="collaoid"
    partialTriggers="collagercode">
    <af:inputListOfValues id="laoIdId"
    popupTitle="Search and Select: #{bindings.Packstuecke0012.hints.LaoId.label}"
    value="#{row.bindings.LaoId.inputValue}"
    model="#{row.bindings.LaoId.listOfValuesModel}"
    required="#{bindings.Packstuecke0012.hints.LaoId.mandatory}"
    columns="#{bindings.Packstuecke0012.hints.LaoId.displayWidth}"
    shortDesc="#{bindings.Packstuecke0012.hints.LaoId.tooltip}"
    partialTriggers="lagerCodeId">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.Packstuecke0012.hints.LaoId.format}"/>
    </af:inputListOfValues>
    </af:column>
    After selecting a value in the LOV and leave the LOV the id in the corresponding column field doesn't change.
    Same LOV outside of table works fine.
    Any suggestions?
    regards
    Peter

    Hi,
    Ok, I try to explain the problem more detailed:
    1) I have a model driven LOV (af:inputListOfValues) within a af:table column
    2) LOV is based on view and shows the id "LagerCode"
    3) Navigate to view object in the model select "Attributes" on the left side and double-click on the attribute "LagerCode"
    4) This opens the dialog "edit Attribute: LagerCode"
    5) navigate to register "UI-Hints"
    6) And here is the important step: UNSELECT the checkbox "Query List Automatically".
    7) Run the application and open the LOV --> The LOV list is empty (because of step 6)
    8) Execute "search" in the LOV and select any value
    9) PROBLEM: No value is returned to af:inputListOfValues
    If I do the same steps with a LOV outside of af:table everything is OK.
    If I do NOT UNCHECK the checkbox "Query List Automatically" in step 6 than the LOV list is queried as soon as the LOV dialob opens. In this case the selected value from the LOV list will be returned to af:inputListOfValues.
    I hope you are able to follow my steps and you can reproduce the problem.
    regards
    Peter

  • Handle Query when he doesn't return value

    hello,
    I have this code in a WBP
    begin
    go_block('xxx');
    execute_query;
    end;
    and in my 'xxx' block i have a pre-query that makes a set_block_property('xxx',defaut_where,value);
    but when my query doesnt find any record he still continues to run untill he returns me somes wrong records. how i know? I checked in backend with the condition values and there are no records for these condition values. so i think it's may be because i didn't handle my query for when he doesn't find records that match with the condition.
    if some cn tell me what to do and where to do it to resolve this problem, it will be nice to him.
    thanks
    Charly

    user10131488 wrote:
    Hello,
    Sorry to ask you that, but i tried to retrieve the last query in the system variable, but i can't. first i create an item and create a WMC trigger and i put this code in it:
    DECLARE
         tempv VARCHAR2(500);
    BEGIN
    tempv:=:SYSTEM.LAST_QUERY;
    :GPV_OBJECTIF.TEXT_ITEM326:=temp;
    END;
    i received an error that there is an exception that not handle. when i click on this item nothing happened.
    may be i placed the code in the wrong trigger.
    also i checked my query carefully, it seems everything is all rigth.
    CharlyMouse triggers are intentionally ignored in WebForms, they will not fire.
    you need to use some other trigger or a button or a message. What is the error you got?? you probably need to use a variable greater than VARCHAR2(500), try using VARCHAR2(4000) just to be on the safe side.
    Tony

  • Messagechoice doesn't return value selected.(urgent)

    Hi Experts,
    I created an LOV field using personalization to a seeded page like in one of your tutorial with same VO name at Picklist View Instance and View Instance(xxxyycolumnVO). On the page when the submit is clicked i have get all the values selected and inputs, But here when I hit submit the LOV value will be the value when page opened and when it is changed it still gives the same value. here is the piece of code:
    public void processRequest(OAPageContext OAPageContext, OAWebBean OAWebBean) {
    super.processRequest(OAPageContext, OAWebBean);
    OAApplicationModuleImpl am = (OAApplicationModuleImpl)OAPageContext.getApplicationModule(OAWebBean);
    OAViewObject oav= (OAViewObject)am.findViewObject("xxxyycolumnVO") ;
    System.out.println("\n i am here \n");
    if ( oav != null )
    System.out.println("XXXX Found VO DetailFuelTypesVO for Mileage AM. This means we have re-entered the page" );
    else
    System.out.println("XXXX CAN NOT FIND VO DetailFuelTypesVO for Mileage AM" );
    oav = (OAViewObject)am.createViewObject("xxxyycolumnVO", "xxx.oracle.apps.ont.xxxx.server.yycolumnV") ;
    OAPageLayoutBean oapagelayoutbean = OAPageContext.getPageLayoutBean();
    if ( oav != null )
    System.out.println("XXXX FINALLY FOUND VO DetailFuelTypesVO for Mileage AM" );
    oav.setWhereClauseParams(null);
    oav.executeQuery();
    System.out.println("After Execute query");
    public void processFormRequest(OAPageContext OAPageContext,
    OAWebBean webBean) {
    super.processFormRequest(OAPageContext, webBean);
    if(OAPageContext.getParameter("GoControl")!=null){
    OAApplicationModuleImpl am = (OAApplicationModuleImpl)OAPageContext.getApplicationModule(webBean);
    OAViewObjectImpl vo = (OAViewObjectImpl) am.findViewObject("xxxyycolumnVO");
    Row r =vo.getCurrentRow();
    System.out.println("\n lookup_code : "+ r.getAttribute("LookupType").toString());}

    Sumit Sharma,
    You are right, I have to put the base VO in the View instance, But this page no VO attached to it. When I see the code in actual controller it is taking data entered and sending to a procedure. Thats it.
    The problem is I can't get hold of any type I create here messagestyleinput/messagechoice, I can't get hold of pagecontext.get...() in this page.
    This is oracle seeded page in Order Information user> Order status>ONT Feedback page.
    Has anyone customized this page or this kind of a page.
    thanks
    kiran

  • Store procedure doesn't return resultset

    hi guys
    i m stuck in a prob.I am using "com.microsoft.jdbc.sqlserver.SQLServerDriver"
    when i call a normal query it run fine but when i try to call a store procedure it gives no result set was produce, is it a problem with driver but if i use jdbsodbc driver it work fine.
    code:-
    pStmt= conn.prepareStatement("{call insertOpacResultsTemp(?,?,?,?,?)}");
    pStmt.setString(1,sUserID);
    //and other parameters
    Resultset=pStmt.executeQuery();
    plz guys help me out

    Hello Amit,
    Oracle Stored Procedure
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    create or replace package test_package as
    type my_cursor is ref cursor;
    procedure test_procedure (name in varchar2,sys_cursor out my_cursor);
    end test_package;
    create or replace package body test_package
    as
    procedure test_procedure (name in varchar2,sys_cursor out my_cursor)
    as
    l_sys_cursor my_cursor;
    begin
         open l_sys_cursor
         for select * from krm_system
         where parameter_id = name;
         sys_cursor:= l_sys_cursor;
    end test_procedure;
    end test_package;     
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Java code for getting result set
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    public class StoredProcTester{
         public static void main(String args[]){
              try{
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:isorcl","user_id","password");
                   CallableStatement cstmt = conn.prepareCall("{call test_package.test_procedure(?,?)}");
                   cstmt.setString(1,"MAX_MEMORY");
                   cstmt.registerOutParameter(2,OracleTypes.CURSOR);
                   cstmt.execute();
                   ResultSet rs = (ResultSet)cstmt.getObject(2);
                   while(rs.next()){
                        System.out.println("ID\t" + rs.getString(1));
              }catch(Exception e){
                   e.printStackTrace();
    }

  • How to get return values from stored procedure to ssis packge?

    Hi,
    I need returnn values from my stored procedure to ssis package -
    My procedure look like  and ssis package .Kindly help me to oget returnn value to my ssis package
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author: <Author,,Name>
    -- Create date: <Create Date,,>
    -- Description: <Description,,>
    -- =============================================
    ALTER PROCEDURE [TSC]
    -- Add the parameters for the stored procedure here
    @P_STAGE VARCHAR(2000)
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    -- Insert statements for procedure here
    --SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2>
    truncate table [INPUTS];
    INSERT
    INTO
    [INPUTS_BASE]
    SELECT
    [COLUMN]
    FROM [INPUTS];
    RETURN
    END
    and i am trying to get the return value from execute sql task and shown below
    and i am taking my returnn value to result set variable

    You need to have either OUTPUT parameters or use RETURN statement to return a value in stored procedures. RETURN can only return integer values whereas OUTPUT parameters can be of any type
    First modify your procedure to define return value or OUTPUT parameter based on requirement
    for details see
    http://www.sqlteam.com/article/stored-procedures-returning-data
    Once that is done in SSIS call sp from Execute SQL Task and in parameter mapping tabe shown above add required parameters and map them to variables created in SSIS and select Direction as Output or Return Value based on what option you used in your
    procedure.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to call an Oracle Procedure and get a return value in Php

    Hi Everyone,
    Has anyone tried calling an Oracle procedure from Php using the ora functions and getting the return value ? I need to use the ora funtions (no oci)because of compatibility and oracle 7.x as the database.
    The reason why I post this here is because the ora_exec funtion is returning FALSE but the error code displayes is good. Is this a bug in the ora_exec funtion ?
    My code after the connection call is as follows:
    $cur = ora_open($this->conn);
    ora_commitoff($this->conn);
    $requestid = '144937';
    echo $requestid;
    $rc = ora_parse($cur, "begin p_ins_gsdata2
    (:requestid, :returnval); end;");
    if ($rc == true) {
    echo " Parse was successful ";
    $rc2 = ora_bind ($cur, "requestid", ":requestid", 32, 1);
    if ($rc2 == true) echo " Requestid Bind Successful ";
    $rc3 = ora_bind ($cur, "returnval", ":returnval", 32, 2);
    if ($rc3 == true) echo " Returnval Bind Successful ";
    $returnval = "0";
    $rc4 = ora_exec($cur);
    echo " Result = ".$returnval." ";
    if ($rc4 == false) {
    echo " Exec Returned FALSE ";
    echo " Error = ".ora_error($cur);
    echo " ";
    echo "ErrorCode = ".ora_errorcode($cur);
    echo "Error Executing";
    ora_close ($cur);
    The Oracle procedure has a select count from a table and it returns the number of records in that table. It's defined as:
    CREATE OR REPLACE procedure p_ins_gsdata2 (
    p_requestid IN varchar2 default null,
    p_retcode OUT varchar2)
    as
    BEGIN
    SELECT COUNT (*) INTO p_retcode
    FROM S_GSMRY_DATA_SURVEY
    WHERE request_id = p_requestid ;
    COMMIT;
    RETURN;
    END;
    Nothing much there. I want to do an insert into a table,
    from the procedure later, but I figured that I start with a select count since it's simpler.
    When I ran the Php code, I get the following:
    144937
    Parse was successful
    Requestid Bind Successful
    Returnval Bind Successful
    Result = 0
    Exec Returned FALSE
    Error = ORA-00000: normal, successful completion -- while
    processing OCI function OBNDRA
    ErrorCode = 0
    Error Executing
    I listed the messages on separate lines for clarity. I don't understand why it parses and binds o.k. but the exec returns false.
    Thanks again in advance for your help. Have a great day.
    Regards,
    Rudi

    retcode=`echo $?`is a bit convoluted. Just use:
    retcode=$?I see no EOF line terminating your input. Your flavour of Unix might not like that - it might ignore the command, though I'd be surprised (AIX doesn't).
    replace the EXEC line with :
    select 'hello' from dual;
    and see if you get some output - then you know if sqlplus commands are being called from your script. You didn't mentioned whether you see the banner for sqlplus. Copy/paste the output that you get, it will give us much more of an idea.

  • Invoke/db adapter get not the return value of a procedure

    Hi,
    I have a problem with a db adapter.
    A db adapter calls a wrapper procedure and fill data in a object type.
    the wrapper procedure call a procedure in a other schema.
    In that schema the procedure make a insert in a database table
    and give a return value(success_msg or error_msg).
    schema1.pkg_wrapper.proc1(p_in IN schema2.param1_t,p_out out schema2.param2_t)
    is
    begin
    schema2.pkg.proc1(p_in IN param1_t,p_out out param2_t)
    end;
    In one enviroment the bpel process running well in the second enviroment not.
    I had found that the bpel process write in the database and the out parameter is filled with 'ok'.
    But there ist a problem to transfer the value from the called procedure to the db adpater/invoke.
    The releases of the application server and the database a the same, also the releases of jdeveloper.
    My second problem the instance didn't comming back and the entry in the domain.log is
    <2008-04-25 12:51:48,056> <WARN> <mmerkel.collaxa.cube> <BaseCubeSessionBean::logWarning> Error while invoking bean "finder": [com.collaxa.cube.engine.core.InstanceNotFoundException: Instance not found in datasource.
    The process domain was unable to fetch the instance with key "2e52cdd31acca03e:5800031c:119819b87bf:-7bdd" from the datasource.
    Please check that the instance key "2e52cdd31acca03e:5800031c:119819b87bf:-7bdd" refers to a valid instance that has been started and not removed from the process domain.
    ORABPEL-02152
    Instance not found in datasource.
    The process domain was unable to fetch the instance with key "2e52cdd31acca03e:5800031c:119819b87bf:-7bdd" from the datasource.
    Please check that the instance key "2e52cdd31acca03e:5800031c:119819b87bf:-7bdd" refers to a valid instance that has been started and not removed from the process domain.
    and
    <2008-04-25 13:47:53,666> <ERROR> <mmerkel.collaxa.cube.engine> <CubeEngine::processStaleInstance> Instance 2670008 has already been marked as stale ... skipping
    <2008-04-25 13:47:53,672> <ERROR> <mmerkel.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "instance manager": [com.collaxa.cube.engine.core.InstanceStaleException: Inconsistent process guid.
    The instance "2670008" was created with process guid "MD5{ed3f0862561da5254a6cf2fd5a440500}"; the current guid for the process "bucheReo" (revision "1.0") is "MD5{0a8bf160d2ff79eabb2f4b479e876cd0}". Whenever a process is deployed on top of an existing process with the same process id and revision tag, all instances created from the previous process are marked as stale.
    If you are accessing this instance from the console, your browser may be referring to an out-of-date page; please click on the Instances tab to get the current list of active instances.
    ORABPEL-02032
    Inconsistent process guid.
    The instance "2670008" was created with process guid "MD5{ed3f0862561da5254a6cf2fd5a440500}"; the current guid for the process "bucheReo" (revision "1.0") is "MD5{0a8bf160d2ff79eabb2f4b479e876cd0}". Whenever a process is deployed on top of an existing process with the same process id and revision tag, all instances created from the previous process are marked as stale.
    If you are accessing this instance from the console, your browser may be referring to an out-of-date page; please click on the Instances tab to get the current list of active instances.
    Have anyone a idea?
    Every help is welcome?
    Thanks, Michael

    Hi,
    “You should be able to use an assign to copy an output parameter value from the BPEL variable associated with the output parameter of the stored procedure.”
    Yes, that is working well for the input variable. But that doesn’t work for the output variable in the second environment.
    The whole bpel process working well in one environment and does not in the second.
    By now I think there is any adjustment in the database or in the aplication server that we not found and that make the trouble
    What I do is that a invoke element (Invoke_WriteREOInDB) call the db adapter WriteREOInDB. My input variable WriteREOInDB_InputVariable is filled, the db adapater call a procedure and I see my data in the table. Now the procedure gives the result value ‘ok’
    In the invoke element I had the output variable WriteREOInDB_OutputVariable. In the next step I want to assign the value of WriteREOInDB_OutputVariable to my global output variable.
    But the instance didn’t coming back. In the console I get the following message:
    “Instance not found in datasource.
    The process domain was unable to fetch the instance with key "2e52cdd31acca03e:5800031c:119819b87bf:-7e0b" from the data source.”
    So I see nothing in the bpel console.
    Any idea?
    Thanks
    Michael

  • How to get both, the ResultSet and Output (return value) from Oracle Stored Procedure

    Hi! I am doing a conversion from MSSQL to Oracle with C++ and MFC ODBC. Any comment is appreciated!! I have Oracle 8i and Oracle ODBC 8.1.6 installed.
    My question is how to retrieve the return value AND ALSO the resultSet at the same time by using Oracle function without modifying my souce codes (except puttting mypackage. string infron of my procedure name, see below).
    -- My source code in C++ with MSSQL ....
    sqlStr.Format("{? = call ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    Where CustoemrList is a Crecordset object...
    IN DoFieldExchange(CFieldExchange* pFX) I have ...
    //{{AFX_FIELD_MAP(CQOSDB_Group)
    pFX->SetFieldType(CFieldExchange::outputColumn);
    RFX_Long(pFX, T("Name"), mCustoemrName);
    //}}AFX_FIELD_MAP
    // output parameter
    pFX->SetFieldType( CFieldExchange::outputParam );
    RFX_Int( pFX, T("IndexCount"), mCustomerNumber);
    -- m_CustomerNumber is where i store the return value!!!
    -- In Oracle Version, i have similar codes with ...
    sqlStr.Format("{? = call mypackage.ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    -- I have oracle package/Body codes as following...
    create or replace package mypackage
    as
    type group_rct is ref cursor;
    Function listgroups(
    nameID NUMBER ,
    RC1 IN OUT Mypackage.group_rct ) return int;
    end;
    Create or replace package body mypackage
    as
    Function listgroups(
    NameID NUMBER ,
    RC1 IN OUT Mypackage.group_rct )return int
    IS
    BEGIN
    OPEN RC1 FOR SELECT Name
    from Customer
    WHERE ID = NameIDEND ListGroups;
    END
    return 7;
    END listgroups;
    END MyPackage;
    Ive simplified my codes a bit....
    null

    yes, it is exactly what i want to do and I am using Oracle ODBC driver.
    I tried using procedure with 1 OUT var fo numeric value and the other IN OUT ref cursor var instead of function, but error occurs when I called it from the application. It give me a memory ecxception error!!
    sqlStr.Format("{? = call ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    it seems to me that the ? marker var is making all the trouble... can you please give me any more comment on this?? thanks!
    null

  • Return values for a Form based on a procedure

    Hi,
    I am fairly new to Portal Applications.
    I have a form based on a procedure.
    The procedure has an IN OUT parameter and what happens at the moment is that once the submit button is pressed the IN OUT parameter is displayed on a new page.
    My question is...
    How do I display the returned value in a field on the form?
    Please help
    Thanks

    Hi,
    This is how it works right now. It is not possible to show it in the same form.
    Thanks,
    Sharmila

  • SOAP TO JDBC scenario: calling stored procedure which will return the value

    Hi
    I have Soap To Jdbc scenario in which I am going to call the Stored Procedure at target side which will be executed and it is going to return the result set .
    Result contains following values.
    return code as ( 0 Or 1) and also specific exception message if its return code as 1.
    Could you suggest me the way by which I can handled this return code and send it back to the Sap PI system then the same thing is directed the to SMTP server for sending mail to consern person.
    Regards
    Kumar

    The OUT parameters of stored procedure will be returned as response. Where exactly are you facing the proble? Here is a complete walkthourgh
    /people/luis.melgar/blog/2008/05/13/synchronous-soap-to-jdbc--end-to-end-walkthrough
    In your case, you don't want response at sender. Instead you want to mail it. For this you may use BPM to design your scenario with following steps
    Receive (to receive data from sender)
    Send Sync (to stored procedure and get response)
    Send Async (to mail receiver)
    Regards,
    Prateek

  • How to use stored procedures in DIAdem and Can the stored procedures be used to return values?

    Can anyone please tell me how to use stored procedures in diadem and to return values from it. Its really important, can you please answer it at the earliest.
    Thanks In advance
    spiya

    Hi Spria,
    I'm very sorry for the mix-up, I thought Allen was going to answer you back with the particulars that we found out. Check out the attached Word document and the below tidbits:
    The built-in DIAdem ODBC functions {SQL_...()} can only call stored functions, which return a scaler result {found then in SQL_Result(1,1)}. The syntax for this with an ORACLE db is
    "select function(parameters) from package"
    ...where package defaults to "dual" if you don't use your own package.
    There might be exceptions to that though, and the syntax will be different for other databases. Note that stored ORACLE procedures can NOT be called from the ODBC functions, instead you must use either ADO function calls in the DIA
    dem VBScript or the OO4O COM wrapper that ORACLE provides (this is described in further detail in the below Word document).
    Hope this helps,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Calling_ORACLE_Stored_Procedures_from_DIAdem.doc ‏28 KB

  • How to Create a Procedure/Function to Return more than one value

    How I can write a function/Procedure to which one value is passed and it will return nine values. How I can use these values

    Syed,
    I would use PL_SQL table versus a VARRAY for this purpose as you will have an advantage of joining PL_SQL table if you want to in your SQL statements in the procedure.
    1. At the SQL prompt, create a type using,
       create or replace type myTable as table of VARCHAR2(100);
    2. Pass the table to your procedure as IN OUT parameter,
    Create or replace procedure
    myProc(pvar1 IN Number, passingArray IN OUT myTable) AS
    Begin
        --Fill the array with your logic
        for i in 1..9
        loop
            passingArray.extend;
            passingArray(passingArray.count) := 'what ever';
        end loop; 
    End;
    3. From your Main prog, you call  Myproc
       --declare a variable for type first
       passingArray myTable := myTable();
       begin
       myProc(10, passingArray());
       --At this point, You would be able to Join the PL_SQL table
       --which gives you the power of using SQL with PL_SQL tables
       end; -- end of main program
    4. All done!I have not shown how to use PL_SQL tables in SELECT statements, as that is not the subject here.
    At the end of the story, I would say, if you know the number of arguments that you are going to pass to a procedure, Simply use "that many" IN OUT parameters to finish your task(9 in your case). Although the proc call looks large with this, it is much simpler. The above approach is VERY helpful if YOU DO NOT KNOW THE NUMBER OF ARGUMENTS that you are sending AND receiving From a procedure.
    Thx,
    SriDHAR

  • How to create a procedure function with a return value of ref cursor?

    Can anybody provide a sample about how to create a procedure function with a return value of REF CURSOR?
    I heard if I can create a function to return a ref cursor, I can use VB to read its recordset.
    Thanks a lot.

    http://osi.oracle.com/~tkyte/ResultSets/index.html

Maybe you are looking for

  • Export to Word RTF - Page Server error when over 160 pages exported

    We have XIR2 SP2 We have a Crystal report published into this Enterprise which, when all parameters are widened, runs to 190 pages. The resultant report includes tables We can export to PDF but the client requires it in Word RTF We can export to Word

  • I am attempting to download Adobe Flash Player 11 and it doesn't actually download.   Help.

    I've attempted to download Adobe Flash Player 11 and have gone through the whole process and receive an indication that it is downloaded, however, it is not.  Help.

  • Undo bug, mouse pointer disappears?

    Is just me or everyone has that annoying "undo" bug? That's what happens: when I press UNDO speedgrade starts to behave strangely. - If I press undo after clicking right mouse button (and I'm moving a color wheel with mouse) comes out a message "opti

  • Upgrade J2ee Engine 1.4.2_06 to 1.4.2_11

    Hi, In our production XI3.0 SP16 server j2ee engine sutting down if we run many jobs at a time. Currently we are using j2ee 1.4.2_06 , this problem happend due to j2ee engine unstability. SAP note says that need to upgrade j2ee from 1.4.2_06 to 1.4.2

  • Selecting Row from Rowset

    I have a rowset (table) displayed, and I want the user to be able to click on any row in the displayed table, thereby selecting that row. I tried using a button as the component type in the table layout, but where do I extract the value from? xxxRowS