Multiple rows to be returned from a procedure without a cursor?

We can return multiple rows using ref cursor as the return type in a procedure/function but I want to avoid processing a cursor. I would like to use the select statement on the returned multiple rows. I believe pl/sql table can not be used here also as select are not permitted on it. Is there some way to get around this defficiency in oracle?? Please help out!! My email is [email protected]
null

Oracle 8i has temporary tables. As far as I know, this is your only option.
I, too, would like to be able to return a true "relation" (or "table") from a pl/sql function. Why can't I just specify the return type of the function as a "table" of "records"?
Note that if pl/sql is completely orthogonality (neat word, huh?) I should be allowed to use this function that returns a "relation" as a table in the "from" clause of a sql query.
Speaking of complete orthogonality, why can't I treat a pl/sql table just like any other table -- I should be able to query it, "insert" into it, "update" it, join it to other "tables", etc.
How about this for a slogan, "tables everywhere"? Anything, from arrays scalars to functions to arrays of classes to pl/sql tables should be able to participate in a sql statement as a "relation/table."
Anyone from Oracle listening out there? :-)

Similar Messages

  • Finding # rows to be returned from dbms_sql

    I need to know how many rows are going to be returned from my dbms_sql (without looping). Currently I am going thru a loop until no more rows are left.
    LOOP
    if dbms_sql.fetch_rows(cursor_handle) > 0 then null;
    END LOOP;

    Unless you have a count(*) in the query, Oracle won't know how many rows are returned by a query until it returns the last row. Why do you need to know the exact count ahead of time?
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Insert Multiple rows into the table from that table data

    Hi All,
    I have a requirement like to insert mulitple rows into the table from that table data only(I need to replicate the data).
    In this table primary key is composite primary key with all foreign keys.primary key also including the Date foreign key.I need to change that date at the of insertion.
    INSERT
    INTO myschema.Fact_page_performance
    time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available ,
    date_sk
    VALUES
    (SELECT time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available
    FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
    WHERE date_sk=20090509,20090510
    But it is giving the error like missing Expression.
    Could anyone please help to me.
    Thanks and Regards
    Swetha.

    You can have either VALUES or SELECT not both
    INSERT
    INTO myschema.Fact_page_performance
    time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available ,
    date_sk
    SELECT time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available
    FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
    WHERE date_sk=20090509,20090510;

  • Multiple row insertion into rm_text_lines from "free format select text"?

    We use the Repository Object Navigator (RON) to define views through the "free format select text" ("Select text" and "Where/Validation condition" fields).
    Before the upgrade/migration to 9i (repository and clients), multi-line definitions inserted in these text fields with older Designer clients were saved in multiple rm_text_lines rows and have remained this way after the upgrade/migration.
    With the 9i Designer clients, the multi-line definition (separated by "Enter" key) are now inserted as only one row.
    Is there any (easy) way in Designer 9i client to "force" the insertion of multiple rows into rm_text_lines when an "Enter" (chr(13)+chr(10)) is encountered?

    Can you give a use case? Are you using some Repository API scripts that expect that rm_text_lines are no longer than a single line, that are now failing when the text is actually fairly long? Are you printing and want to make sure that line breaks occur where the user put them?
    I ask because there really isn't a way to force Designer to break long text into multiple rm_text_line rows. Therefore, you are going to have to change your API scripts and reports to take the possible long lines into account.

  • Can we get data return from stored procedure in a select query ?

    Hello,
    Suppose i have a function GetSum(x,y) that returns sum of two numbers x and y .We can call this function from within a sql function like this :
    select GetSum(4,5) SUM from dual;But is this possible through a stored procedure ? i.e., can i call a stored procedure from within a select query like i have done in above code ?

    Hi,
    bootstrap wrote:
    Hello,
    Suppose i have a function GetSum(x,y) that returns sum of two numbers x and y .We can call this function from within a sql function like this :
    select GetSum(4,5) SUM from dual;But is this possible through a stored procedure ? i.e., can i call a stored procedure from within a select query like i have done in above code ?The short answer has already been given.
    Why can't you use a function?
    Suppose you could use a procedure. What results would you want to see from:
    SELECT  my_proc (4, 5)
    FROM    dual
    ;? Why?
    Explain what you want to do, and somebody will help you find a good way to do it.

  • REF CURSOR RETURNED FROM STORED PROCEDURE OPENED WITH CURRENT_USER PRIVILEGES

    Hi.
    I was wondering if anyone knows when this bug will be fixed. The bug# is 899567 off of metalink.
    I am running into this problem as well, and we do not want to use OCI/SQLNet as the fix. We have an application with secure data concerns and only want to give access to stored procedures to an application user.
    Thanks,
    Brad

    I'm using version 8.1.6.0.0 on a W2K server.
    PS: a strange behaveour
    if i try to insert a row using the following anonymous pl/sql block
    begin
    insert into objects select 2, 'B', ref(c) from meta.classes c where id =1;
    end;
    i get the following error msg
    ERROR at line 1:
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-302: component 'OBJ_T' must be declared
    but if i use only the sql command from the sql plus prompt
    insert into objects select 2, 'B', ref(c) from meta.classes c where id =1;
    the row is inserted.
    OBJ_T is the object type(id number, label varchar2, class ref class_t),
    OBJECTS is a table of obj_t,
    CLASS_T is an object type(id number, label varchar2)
    CLASSES is a table of CLASS_T.
    null

  • Collection-Inserting multiple rows in single shot within stored procedure

    Hello,
    Below are the data for rows that I want to insert into CUSTOMER_PRODUCT table from a stored procedure.
    Instead of making round trips twice to insert these two rows, I looking for a way to pass in the data for both those rows and then insert them from within the stored procedure in one shot.
    The stored procedure will be invoked by Java and .NET.
    Sample Data for CUSTOMERPRODUCT:_*
    ROW 1:
    CUSTOMER_ID : 1000
    PRODUCT_TYPE : PROD123
    IS_MEMERSHIP : Y
    IS_EMAIL_SUBSCRIPTION: Y
    ROW 2:
    CUSTOMER_ID : 1001
    PRODUCT_TYPE : PROD123
    IS_MEMERSHIP : Y
    IS_EMAIL_SUBSCRIPTION: Y
    Question 1:
    Which is the best way to do it?
    Question 2:
    Should collection be used? (or) is there any other approach that could be utilized?
    Question 3:Can you please provide a sample?
    Question 4:
    Are there any performance concerns in passing collection and iterating it to fetch value to insert into CUSTOMER_PRODUCT table?
    I'm running Oracle 10g.
    Thanks!

    user8291616 wrote:
    >
    Question 3:Can you please provide a sample?
    A sample in PL/SQL. /* Exceptions are not handled...*/
    SQL> create table test_customer
      2  (customer_id varchar2(10),PRODUCT_TYPE varchar2(10),
      3  IS_MEMERSHIP varchar2(1),IS_EMAIL_SUBSCRIPTION varchar2(1));
    Table created.
    SQL> create or replace package test_package is
      2     type cust_tab is table of test_customer%rowtype;
      3    procedure insert_customer(p_cust_dtls cust_tab);
      4  end;
      5  /
    Package created.
    SQL> create or replace package body test_package is
      2    procedure insert_customer(p_cust_dtls cust_tab) is
      3    begin
      4      forall i in 1..p_cust_dtls.count
      5          insert into test_customer
      6          (customer_id,PRODUCT_TYPE,IS_MEMERSHIP,IS_EMAIL_SUBSCRIPTION)
      7          values(p_cust_dtls(i).customer_id,p_cust_dtls(i).PRODUCT_TYPE,
      8                 p_cust_dtls(i).IS_MEMERSHIP,p_cust_dtls(i).IS_EMAIL_SUBSCRIPTION);
      9    end;
    10  end;
    11  /
    Package body created.
    --Calling the same in PL/SQL. You will do this part in JAVA..
    SQL> declare
      2    lt_cust test_package.cust_tab := test_package.cust_tab();
      3  begin
      4    lt_cust.extend(2);
      5    lt_cust(1).customer_id := '1000';
      6    lt_cust(1).PRODUCT_TYPE := 'PROD123';
      7    lt_cust(1).IS_MEMERSHIP := 'Y';
      8    lt_cust(1).IS_EMAIL_SUBSCRIPTION := 'Y';
      9    lt_cust(2).customer_id := '1001';
    10    lt_cust(2).PRODUCT_TYPE := 'PROD123';
    11    lt_cust(2).IS_MEMERSHIP := 'Y';
    12    lt_cust(2).IS_EMAIL_SUBSCRIPTION := 'Y';
    13    test_package.insert_customer(lt_cust);
    14    commit;
    15  end;
    16  /
    PL/SQL procedure successfully completed.
    SQL> select *
      2  from test_customer;
    CUSTOMER_I PRODUCT_TY I I
    1000       PROD123    Y Y
    1001       PROD123    Y Y

  • Who know how to handle pl/sql table return from stored procedure calling from jsp

    I have some stored procedure which return pl/sql table (index by table), It is look like an array. how jdbc handle this?
    CallableStatement cs = con.prepareCall("EXECUTE bill.getcountry(?,?)");
    cs.setInt(1, cid);
    cs.registerOutParameter(2, java.sql.Types.VARCHAR);// ARRAY?
    ResultSet rs = cs.executeQuery();
    Array array = (Array) rs.getObject (1);
    ResultSet array_rset = array.getResultSet ();

    Not that familiar with the OCI (Oracle Call Interface), but I think this call will be problematic - the OCI deals with SQL data types and not with PL/SQL structures.
    The OCI has since Oracle 8i sported an object call interface (see OCI Runtime Environment for Objects for details).
    This allows you to use the CREATE TYPE command to create advance user data types - and these are supported by the SQL engine, PL/SQL engine and external languages via the OCI.
    So you need to have a look at the Perl-DBI documentation to see how it supports Oracle object types and consider using these. As for internal PL/SQL data structures. These are not supported by the SQL engine and I would expect limited or no support in the OCI for these. Anyway, using SQL data types makes a lot more sense ito flexibility and transparency across languages and environments.

  • Create multiple rows in Oracle ADF (From Andrejus Baranovskis's Blog)

    Hi All,
    I followed the steps in the Blog Sample.
    I tried this example with 2 tables -> Emp_Details(fields->empId and empName)and Multiple_Entry(fields-> empId and email).
    ashu.jspx is my jsf page and Ashu.java is the backing bean.
    I checked it many times, but getting the same error. Error is as follows:-
    500 Internal Server Error
    javax.faces.FacesException: #{backing_ashu.createButton_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98) at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:233) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:202) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123) at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92) ... 27 moreCaused by: java.lang.NullPointerException at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:706) at java.util.ResourceBundle.getBundle(ResourceBundle.java:699) at com.praphulla.khandala.view.utils.JSFUtils.getBundle(JSFUtils.java:227) at com.praphulla.khandala.view.utils.JSFUtils.getStringFromBundle(JSFUtils.java:142) at com.praphulla.khandala.view.backing.Ashu.createButton_action(Ashu.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146) ... 28 more
    Plz provide me some help.
    Praphul

    Thank you for your reply..
    If the am1.invokeMethod("createUserLoc"); is not there in the while loop, it goes through the while loop and gives SOP values correctly.
    But if I put this statement in while loop, it errors out in the first iteration itself.

  • How to return a resultset in a stored procedure without using Cursor

    Dear all,
    I need to return a resultset in a stored procedure.
    I know I can return a Cursor.
    But because there are many complicate logics I need to carry out,
    so I can finish all the logic in a SINGLE SQL select statement, so I think it can't
    use Cursor as return value.
    Does anybody know other approaches? Please help.
    Thanks!

    Some basic techniques that one can use in SQL. These are merely to illustrate (simplistically) different approaches.
    > field3 = select count(*) from table2,table1 where table2.id = table1.id
    This can be done via an analytical function (refer to the SQL Reference) or very simply, as an in-line select as follows:
    SQL> select
    2 o.object_name,
    3 (select count(*) from user_objects u where u.object_type = o.object_type) as "ONE OF",
    4 o.object_type
    5 from user_objects o
    6 where o.object_name = 'LISTFILES';
    OBJECT_NAME ONE OF OBJECT_TYPE
    LISTFILES 8 PROCEDURE
    So LISTFILE is "one of 8" procedures. I would however rather so this via an analytic function as these are a lot more flexible. Note the WITH clause that allows "modularisation" of SQL - kind of like creating "sub-SQL results" in a single SQL statement:
    SQL> with DATASET1 as(
    2 select
    3 object_name,
    4 count(distinct object_name) over (partition by object_type) as TOTAL_TYPES,
    5 object_type
    6 from user_objects
    7 ),
    8 DATASET2 as(
    9 select
    10 name,
    11 text as SOURCE_LINE,
    12 line as LINE_NO,
    13 count(line) over (partition by name) as TOTAL_LINES
    14 from user_source
    15 )
    16 select
    17 object_name,
    18 '1 of '||total_types||' '||object_type as "TYPE",
    19 source_line as "1st LINE",
    20 total_lines as "TOTAL LINES"
    21 from DATASET1 ds1,
    22 DATASET2 ds2
    23 where ds1.object_name = ds2.name
    24 and ds1.object_name = 'LISTFILES'
    25* and ds2.line_no = 1
    SQL> /
    OBJECT_NAME TYPE 1st LINE TOTAL LINES
    LISTFILES 1 of 8 PROCEDURE procedure ListFiles( cDirectory in varchar2 ) 3
    SQL>
    SQL is quite powerful and analytical functions allows all kinds of aggregation processing per row, accessing the leading or lagging rows' data, etc.
    You need to play around with this to get to grips with it and how to apply it.

  • Run multiple statement at a time in a procedure without scheduler

    Dear,
    I create a procedure that have many select, insert, update statement. How can I execute all the sql statement at a time without using scheduler. Please help me.

    Dear,
    I create a procedure that have many select,
    insert, update statement. How can I execute all the
    sql statement at a time without using scheduler.
    create procedure p is
    e number;
    n varchar2(10);
    begin
    select 1000,'MWZ' into e,n from dual ;
    insert into emp(empno,ename) values (e,n);
    select 7788,'Scotty' into e,n from dual;
    update emp set ename=n where empno=e;
    end;
    /There I can do many select, insert and update at a time
    create or replace procedure p is
    begin
         merge into emp using (
           select 1000 e,'MWZ' n from dual
           union all
           select 7788,'Scotty' from dual
         ) on (empno=e)
         when matched then
           update set ename=n
         when not matched then
           insert (empno,ename) values (e,n);
    end;
    /But again, why do not you want to use dbms_job? You could maybe do this in java

  • Sending multiple rows to result set

    Hi,
    I want multiple rows to be returned from my pl/sql procedure without using cursor?can I do it? Is there any package for this?
    also When I use cursor variable how do I capture that return values?
    regards
    ragh

    First Question:
    grin. One really big string and a custom parser.
    Seriously... I read something about PL/SQL tables being supported in a late/future release... is that true? Do we still use a ref cursor, or can we pass VARRAYS somehow back to Java?
    Third question:
    Posted earlier by Mark Tomlinson:
    This one does it all. Nothing JDeveloper specific here, all JDBC.
    * This sample shows how to call a PL/SQL function that opens
    * a cursor and get the cursor back as a Java ResultSet.
    import java.sql.*;
    import java.io.*;
    // Importing the Oracle Jdbc driver package makes the code more
    readable
    import oracle.jdbc.driver.*;
    public class retrefcur_samp
    public static void main (String args [])
    // throws SQLException
    try
    // Load the driver
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    // Connect to the database
    // You can put a database name after the @ sign in the
    connection URL.
    Connection conn =
    DriverManager.getConnection ("jdbc:oracle:oci8:@ora8tst",
    "scott", "tiger");
    // Create the stored procedure
    init (conn);
    // Prepare a PL/SQL call
    CallableStatement call =
    conn.prepareCall ("{ ? = call java_refcursor.job_listing
    // Find out all the CLERKs person
    call.registerOutParameter (1, OracleTypes.CURSOR);
    call.setString (2, "*");
    call.execute ();
    OracleResultSet rset = (OracleResultSet)call.getObject (1);
    // Dump the cursor
    while (rset.next ()){
    System.out.println (rset.getString ("JOB"));
    rset.close();
    call.close();
    } catch(SQLException esql) {
    System.out.println("Trouble in river city ");
    System.out.println(esql.toString());
    // Utility function to create the stored procedure
    static void init (Connection conn)
    throws SQLException
    Statement stmt = conn.createStatement ();
    stmt.execute ("create or replace package java_refcursor as "
    +
    " type myrctype is ref cursor return
    EMP%ROWTYPE; " +
    " function job_listing (j varchar2) return
    myrctype; " +
    "end java_refcursor;");
    stmt.execute ("create or replace package body java_refcursor
    as " +
    " function job_listing (j varchar2) return
    myrctype is " +
    " rc myrctype; " +
    " begin " +
    " open rc for select * from emp; " +
    " return rc; " +
    " end; " +
    "end java_refcursor;");
    stmt.execute ("create or replace package java_ref_clean as "
    +
    " type myrctype is ref cursor; " +
    " function cleanup (cc myrctype) return
    number; " +
    "end java_ref_clean;");
    stmt.execute ("create or replace package body java_ref_clean
    as " +
    " function cleanup (cc myrctype) return number
    is "+
    " result number; " +
    " begin " +
    " close cc; " +
    " end; " +
    "end java_ref_clean;");
    null

  • Problem with database control returning multiple rows as Array  using Oracle

    Has anybody using Oracle gotten a Database control that
    returns multiple rows to work returning an array?
    The only way I can seem to return multiple rows is by returning
    a RowSet. Returning an array gives me a NullPointerException
    (when called within a pageFlow). When calling a database control
    that returns an array from a web service I get a
    "java.sql.SQLException: ResultSet has no more data." error.
    The samples using the pointbase database seem to work, but when I
    converted the CustomerDBClient web service to use Oracle, it starts
    failing on calling the database control that returns an array
    with: "java.sql.SQLException: ResultSet has no more data."
    Has anybody gotten this to work using Oracle?
    I'm also having some problem returning an Iterator. It seems
    to work when called from a web service, but returns nothing
    if called from a page flow.
    I'm using Oracle 8.1.7 and WebLogic 8.1.
    Eric

    Do you need a particular service pack installed to return an array of custom object?
    I am getting a ResultSet contained no data error when trying.
    Thanks,
    -Thomas
    "Robin Karlin" <[email protected]> wrote:
    >
    Eddie O'Neil <[email protected]> wrote:
    All--
    Unfortunately, returning an Iterator to a JPF (or JSP) from a
    database control is broken in WLW 8.1, though it will work inside of
    a
    JWS or JCS.
    There shouldn't be a problem with returning an array of objects out
    of Oracle to the JPF, and if you need an Iterator specifically, youcan
    wrap the array in an Iterator implementation.
    Sorry for the inconvenience.
    Eddie
    Lenny wrote:
    I have gotten it to work on Oracle using Array:)
    However, I haven't gotten it to work on Oracle using Iterator:( Itis so
    simple, but doesn't work:(
    "Eric Dokken" <[email protected]> wrote in message
    news:[email protected]...
    Has anybody using Oracle gotten a Database control that
    returns multiple rows to work returning an array?
    The only way I can seem to return multiple rows is by returning
    a RowSet. Returning an array gives me a NullPointerException
    (when called within a pageFlow). When calling a database control
    that returns an array from a web service I get a
    "java.sql.SQLException: ResultSet has no more data." error.
    The samples using the pointbase database seem to work, but when I
    converted the CustomerDBClient web service to use Oracle, it starts
    failing on calling the database control that returns an array
    with: "java.sql.SQLException: ResultSet has no more data."
    Has anybody gotten this to work using Oracle?
    I'm also having some problem returning an Iterator. It seems
    to work when called from a web service, but returns nothing
    if called from a page flow.
    I'm using Oracle 8.1.7 and WebLogic 8.1.
    Eric
    I get the same error that Eric reported when trying to return an Array
    of objects.
    It is really frustrating because I can't use much of the built-in control
    logic
    that WLW provides. All I did was create a data pool for Oracle and a
    datasource.
    I modified the sample app in C:\bea81\weblogic81\samples\workshop\SamplesApp\WebApp\callJavaControl
    to point to that datasource and I get the error that Eric reports above.
    Can
    anyone help me out????
    Thanks,
    Robin

  • Multiple row update of a table from another one

    Im trying to make a multiple row update with date from a different table, but it's giving me an error.
    update inv.mtl_system_items_b
    set attribute1 = t2.description,
        last_update_date = SYSDATE,
        last_updated_by = 3606
    from inv.mtl_system_items_b t2
         inner join TMP.TMP_INACTIVAR_PRODUCTOS t1
         on t2.segment2 = t1.inventory_item_id;Edited by: user8986013 on 21-may-2010 14:15

    Hi,
    Whenever you have a question involving an error message, post the complete error message, including line number. Don't you think that might help people solve your problem?
    Whneve you have any question, post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data. (In the case of a DM<L statement, like UPDATE, the INSERT statements show the tables before the change, and the results are the contents of the changed table after it.)
    Review the syntax of the UPDATE statement in the SQL Language manual:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10008.htm#sthref9598
    MERGE may be more efficient and easier to use than UPDATE.

  • How to Return From Call to Stored Procedure

    I created an SQL Query Report portlet which contains a Delete
    link next to each record. If the user clicks on the link, it
    calls a JavaScript function which confirms the Delete and then
    calls a stored procedure which deletes the record. After the
    record is deleted, I get a page with,
    "No data returned from stored procedure
    The PL/SQL gateway invoked a stored procedure as part of
    processing the URL but the procedure returned no data."
    How can I get rid of this page and just return to the page that
    contains my report portlet after the stored procedure executes?
    Fran

    Hi Michael,
    I tried the following at the end of my procedure, but I still
    got the error page instead of the page containing the report
    portlet:
    --- return to calling page
    owa_util.redirect_url('http://pmim1a:7778/servlet/page?
    pageid=55&dad=portal30&_schema=PORTAL30');
    Fran

Maybe you are looking for