Adding the ability to use a ref Cursor in future versions of Apex

Currently, it has been established that the Apex does not play well with the ref Cursor and how to get around that. What is a characteristic that the Apex team seeks in future versions? Currently we use Oracle 11 g and 1 g with 4.0.2 Apex. Your answer is most appreciated.

JudJasRis

Until the APEX development team adds this feature, I'd be:

(1) write a pipeline function that will consume the ref cursor and return your data in pipeline to the calling report

(2) write a procedure that will be called before the call to your report, who built a collection of apex you run your report off the coast of...

Thank you

Tony Miller
Ruckersville, WILL

Tags: Database

Similar Questions

  • I lost the ability to use the hue, Saturation and Luminance for a reason any? I now have the Calibration of the camera, which I never use. How can I get HSL back to develop the module?

    I've lost the ability to use the hue, Saturation and Luminance option in develop module. I now have the Calibration of the camera, which I never use. How to bring back HSL? Help!

    Use the menu command

    Window-> panels-> STL/color/black & white

  • Example of using a Ref Cursor variable procedure

    I'm looking for an example of how to execute a stored procedure with a Ref cursor variable in SQL Developer 3.0. I am familiar with the syntax in SQL * Plus, for example:

    variable my_cur refcursor;
    Start
    my_package.my_proc ("in param"
    (: my_cur);
    end;
    /

    print: my_cur

    How would I do the same thing in SQL Developer 3.0?
    Thank you!

    Run a procedure directly. For example, select the package in the browser-> menu-> Run. The dialogue with anonymous block box. Edit, OK it to run, then the procedure would be and all settings including Ref Cursor appear in the grid. (This functionality is there since 3.0)

  • Why do I only a part of the graph of the wave even if I added the whole wave using the shift register?

    It seems only to read 200 samples and then stop. Shouldn't get a chart to continuous wave after using the shift over a time register loop?

    You must remove VI begin to break out of the loop...
    You can not 'start' a task that is already running...

    You also remove the VI start completely from your code... If you do not use start VI, a measurement task starts automatically when executing the DAQmx reading VI.

    Find the attached VI.

  • HP 15-r013ca Notebook PC: updated my wireless card to a double band and so I have the ability to use the available 5 GHz

    How can I replace my card with a card dual band wireless, so I can connect to my disposal, 5 GHz and who to contact if I can buy this wireless card. Thanks for all the information and your time in this matter... Daryl

    Because of the configuration of 1 x 1 antenna in your laptop, the only way you will be able to upgrade to able to use the 5 Ghz band is to use a usb wifi dongle.

  • 2 September 2015 update removed the ability to use the Image as your Signature

    Adobe Acrobat XI me today invited to spend something, so I clicked Yes. Now when he gives me a list of how create my signature, 4 of the 5 options are grayed out and only the left one is 'use a certificate', which I am not interested in practice. I want to only "use image", which I did for the last year and a half. How to do this now?Adobe Image.png

    It is possible when you remove the digital signature field.

  • I don't have the ability to use the hearing during the trial period. Is it possible to extend or even to rent for a month so I have to decide? Thank you!

    I don't have the chance to try the hearing during the trial period. Would it not be possible to extend the trial period for a week or ten days? If this isn't the case, that could I rent for a month?

    You cannot extend the trial on the same computer, but you can start a new trial on another computer, trial software, Adobe has expired at the beginning

  • If Adobe has disabled the ability to use Lightroom 5.7 to see the images in the external hard drive, how one judge the images in the file on the external hard drive without bringing back them to the Lightroom library?

    JPEG images being dragged over to Photoshop are veiwable as thumbnails on the external hard drive.  However back to the DNG RAW images are not visible.  Anyway is to visualize images of type external hard disk?  It would be nice to get a glimpse of what you make in Lightroom simply looking on the external hard drive you can with JPEG files.

    The library, just click on the import button and navigate to your folder on the EHD. Choose the folder and click Add at the top of the dialog box. You should see thumbnail previews in the import dialog box where you can select what to import.

  • Recovery of the records by using the Ref Cursor or indexes per Table (which is better)

    Hi all

    I am interested to know if there is a performance (or other) advantages to return a result set from an Oracle stored procedure for a client application (for example, in Java) by using a Ref Cursor or Index by Table, respectively. Most of the people I met who know Java seem to use a Ref Cursor but did not say why this method is preferable. I'm not too familiar with Java and do not have the opportunity to test the difference between either method, but I am very interested in the other user forum about this view, gauging

    Kind regards

    Kevin.

    KevinFitz wrote:
    Hi zerathul,

    Thanks for the quick and helpful response. A REF CURSOR would be the best solution if the same set of results (content and number of records returned) should be dealt with by the application of the 'customer '. I'm guessing that maybe in this situation 'theoretical' that there might be less network traffic to return the set of results through an associative array,

    Kind regards

    Kevin.

    Yes, it would always be the best solution, because an associative array would mean collecting all the data in memory of expensive PGA on the database server before they pass any return on the network, while a fair Ref cursor is to feed the data over the network (maybe a little extra load, but you were unlikely to notice). Also the client application would treat a ref as of rows returned cursor data recovery and could treat them upon their arrival, an associative array is a collection of data which will then be entirely spent before any treatment could be done and then the treatment should go through the entire table to do.

    REF CURSOR will also provide other information such as the error codes etc regarding SQL if necessary. If you get an error when filling a table on the side of the database, it is not so easy to recover this error to the client.

    REF CURSOR is designed for this purpose. Use them.

  • using plsql table and ref cursor in oracle's 10 g

    Hi all
    Can someone give me an example of a scenario where we need to create a form manually based on a stored database procedure.
    And in this process, I created a pl/sql table and a Ref cursor at the database level.

    CREATE OR REPLACE PACKAGE SCOTT. TYPE BONUS_PKG IS bonus_rec
    IS (RECORD
    EmpNo bonus_EMP.empno%TYPE,
    Ename bonus_EMP.ename%TYPE,
    employment bonus_EMP.job%TYPE,
    SAL bonus_EMP.sal%TYPE,
    Comm bonus_EMP.comm%TYPE);

    TYPE b_cursor IS REF CURSOR RETURN bonus_rec;
    TYPE bontab IS TABLE OF bonus_rec INDEX DIRECTORY.

    PROCEDURE bonus_refcur (bonus_data IN OUT b_cursor);
    PROCEDURE bonus_query (bonus_data IN OUT bontab);
    END bonus_pkg;


    CREATE OR REPLACE PACKAGE BODY SCOTT. BONUS_PKG IS
    PROCEDURE bonus_query (bonus_data IN OUT bontab) IS
    II NUMBER;
    CURSOR bonselect IS
    SELECT empno, ename, job, sal, comm bonus_EMP ORDER BY empno;
    BEGIN
    OPEN bonselect.
    II: = 1;
    LOOP
    Look FOR bonselect IN
    .EmpNo bonus_data (ii),
    .ename bonus_data (ii),
    .job bonus_data (ii),
    .Sal bonus_data (ii),
    .comm bonus_data (ii);
    EXIT WHEN bonselect % NOTFOUND;
    II: = ii + 1;
    END LOOP;
    END bonus_query;

    PROCEDURE bonus_refcur (bonus_data IN OUT b_cursor) IS
    BEGIN
    Bonus_data OPEN to SELECT empno, ename, job, sal, comm bonus_EMP ORDER BY empno;
    END bonus_refcur;

    END bonus_pkg;

    I want to fill in the data in the forms manually is not using Forms data block Wizard and by program.

    Please answer...

    Can someone give me an example of a scenario where we need to create a form manually based on a stored database procedure.

    In general, you will use a block of proceedings based when you have a collection of data from several tables presented in a form and your username must be able to update the information displayed.

    In your sample code, looks like you are using Oracle Support document "Melting a block on a Stored Procedure - examples of Code [ID 66887.1]". If this is the case, continue to follow the document - it guides you through all the steps. There is no need to manually configure things that the data block Wizard will work for you!

    I want to fill in the data in the forms manually is not using Forms data block Wizard and by program.

    Why? Let the wizard block configuration data of your block based on a procedure for you. There is no need to manually browse the data! I did what you're trying, and it's more work needed. Leave forms to do the work for you. :)

    If you absolutely have to do things manually, I recommend that you use the PROCEDURE bonus_query (bonus_data IN OUT bontab) instead of bonus_refcur (bonus_data IN OUT b_cursor) . Then, in your code create a variable of type BONTAB, and then call the bonus_query procedure. Then, it's a simple case of a loop in the table of records returned by the bonus_query procedure. For example:

    DECLARE
       t_bonus    bonus_pkb.bontab;
    BEGIN
       bonus_pkg.bonus_query(t_bonus);
    
       FOR i in 1 .. t_bonus.count LOOP
          :YOUR_BLOCK.EMPLOYEE_NUMBER := t_bonus(i).empno;
          :YOUR_BLOCK.EMPLOYEE_NAME := t_bonus(i).ename;
          :YOUR_BLOCK.EMPLOYEE_JOB := t_bonus(i).job;
          :YOUR_BLOCK.EMPLOYEE_SALARY := t_bonus(i).sal;
          :YOUR_BLOCK.EMPLOYEE_COMMISSION := t_bonus(i).comm;
       END LOOP;
    END;
    

    This code example shows the basics, but as is the sample code - you will need to adapt to your situation.

    Also, I highly recommend that you look at the article inol listed. It is a very thorough debate on the REF CURSOR. If you have set up using a procedure based on the data source - it is more effective to spend the record table to your form that it must pass a ref cursor Using a ref cursor, you might as well just using a standard called cursor and loops on your named cursor. The effect is the same (a line returned at the same time creating lots of network traffic). Using the table of records is more efficient because the data set is returned if the network traffic is reduced.

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • Return of the ref cursor of procedure where the cursor is defined in the specification

    Hello

    Here's pseudo-code

    create or replace package test
    as
    cursor c_emp (number cv_emp_id)
    is
    Select emp_name emp where emp_id = cv_emp_id;

    type ref_c is ref cursor;

    function get_emp_name (number p_emp_id) return ref_c;
    end test;
    /


    create or replace the test physics package
    as
    ref_c function get_emp_name (number p_emp_id)
    is
    ret_val ref_c;
    Start
    Open c_emp (p_emp_id);
    ret_val: = c_emp;
    return ret_val;

    end get_emp_name;
    end test;
    /

    Returns me "PLS-00382: expression is of the wrong type. I tried to use a strongly typed Ref cursor based on the cursor, but nothing helped.

    Clearly, I understand something... and if I can't assign as ' ret_val: = c_emp "and if there is another key way it so please let me know.

    Thank you

    Ralph

    Published by: user13024707 on May 5, 2010 04:43

    user13024707 wrote:
    Clearly the point of my question is being missed.

    Or maybe the question is not been clearly asked. ;)

    I want to set the cursor in the PACKAGE SPECIFICATION, and not in the package body. The issue of the bind variable and the string is neither here nor there because I pass parameters to the cursor.

    What you ask is to use a PL/SQL cursor (defined in the specifications of the package or elsewhere) and that convert a Ref Cursor. N ° cannot be done.
    PL/SQL cursors should be used in the PL/SQL code. REF CURSOR is primary used to pass back a reference to a cursor (and all queries are cursors) to a layer of application outside of PL/SQL for example .net, java, etc.. Once you start using the ref Cursor only really, you have the choice of opening it based on a (dynamic) or a fixed query string as in the examples given. You cannot open a cursor of a PL/SQL cursor definition Ref.

    The difference is that when you do:

      CURSOR cur_mycursor IS
        SELECT ...
    

    you declare a cursor in pl/sql definition, not actually a slider itself. The cursor itself is created when you issue an OPENING or a statement FOR etc. So a Ref Cursor (reference to a slider) cannot refer to the definition of the cursor because it is only a definition, not a cursor (i.e. it has not been sent engine sql and instantiated at that time here). Instead the Ref Cursor must reference a cursor (query), itself, and that may be presented as a string or as the query itself that is issued against the sql engine and then the ref cursor points

    Thus, slider ref and PL/SQL cursors are different concepts, both designed to manage cursors in a slightly different way of programming. You cannot mix them.

  • Need the difference between strong Ref Cursor and weak Ref Cursor examples

    Oracle 9.2

    It would be great if someone can help understand the differences between
    1 Strong Ref Cursors(return type)
    and
    2. weak Ref Cursor (no return type)

    What I read is weak ref Cursor as sys_refcursor is better to use the ref Cursor, because in the case of slider strong Ref object type that will be returned must be declared in advance. It dosent make sense to me?

    I start with the examples would be appreciate for advice

    Strong Ref Cursor

    create the package str_pack
    is
    type sref_type is ref cursor return emp % rowtype;
    SVAR sref_type;
    end str_pack;

    Create procedure st_proc (eid in number, c1 on str_pack.sref_type)
    is
    Start
    Open c1 to select empno, ename, sal from emp where empno = eid;
    end;

    declare
    str_pack.sref_type C1;
    type rec is RECORD (eid, ename varchar2 number (20), number of sal);
    SheikYerbouti rec;
    Start
    st_proc(10,C1);
    loop
    When exit c1% notfound;
    Fetch c1 into SheikYerbouti.
    end loop;
    Close c1;
    end;


    There could be errors in the above example but its basically to get a better understanding.

    For weak Ref Cursor

    procedure of the child

    Create procedure child_proc (in number, c1 on sys_refcursor eid)
    is
    Start
    Open c1 to select empno, ename, sal from emp where empno = eid;
    end;

    parent process

    Create procedure parent_proc (recnum varchar2)
    is
    p_retcur sys_refcursor;
    emp_row emp % rowtype;
    Start
    child_proc (eid, p_retcur);
    loop
    extract the p_retcur in emp_row;
    dbms_output.put_line(emp_row.empno ||) e '|| emp_row. Ename | "wins". emp_row. SAL);
    end loop;
    end parent_proc;

    Concerning
    @

    Hello

    the fundamental difference is to do with the compiling and linking of runtime type that occurs.

    The he should explain a lot more detail than I could ever!
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:1640161160708

    P;

  • Casting table PL/SQL for the type of existing table and back ref cursor

    Hello



    I have the problem of casting a pl/sql table for the type of an existing table and turning the ref cursor to the application. Casting a ref cursor back and number of pl/sql table works well.



    Declarant

    < strong > TYPE type_table_name IS TABLE OF THE package_name.table_name%ROWTYPE; < facilities >

    within the stored procedure, fill in a table of this type temp_table_name and returning the ref cursor help

    < strong > results OPEN to SELECT * FROM TABLE (CAST (temp_table_name AS type_table_name)); < facilities >

    generates an error. type_table_name is unknown in this distribution. According to me, this happens because of the declaration of the type locally.



    Statement type_table_name inside the package specification does not work neither. Incredible, cast to the said dbms_sql.number_table to specify ref cursor back and dbms_sql package works very well!



    < strong > CREATE TYPE type_table_name IS TABLE OF THE package_name.table_name%ROWTYPE; < facilities > deals without any error but creates an invalid type complain a reference to package_name.table_name



    I don't want to declare every column in the table in type_table_name, because any change the table_name table would result in an inconsistent type_table_name.



    Thanks in advance!

    Edited by: user6014545 the 20.10.2008 01:04

    In any case you are right that there is a problem around anchorage (or maintaining) types of objects persistent to match the table structures, they may represent.

    In the case you describe, you might be better off just open the refcursor immediately the using one of the techniques described in the http://www.williamrobertson.net/documents/comma-separated.html to manage the delimited list.

    In the more general case where the line of treatment is necessary, you may make the pipeline functions.

    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    
    SQL> CREATE TABLE table_name
      2  AS
      3     SELECT ename column_name
      4     FROM   emps;
    
    Table created.
    
    SQL> CREATE OR REPLACE PACKAGE package_name
      2  AS
      3     TYPE type_name IS TABLE OF table_name%ROWTYPE;
      4
      5     FUNCTION function_name_pipelined (
      6        parameter_name IN VARCHAR2)
      7        RETURN type_name PIPELINED;
      8
      9     FUNCTION function_name_refcursor (
     10        parameter_name IN VARCHAR2)
     11        RETURN sys_refcursor;
     12  END package_name;
     13  /
    
    Package created.
    
    SQL> CREATE OR REPLACE PACKAGE BODY package_name
      2  AS
      3     FUNCTION function_name_pipelined (
      4        parameter_name IN VARCHAR2)
      5        RETURN type_name PIPELINED
      6     IS
      7     BEGIN
      8        FOR record_name IN (
      9           SELECT table_alias.*
     10           FROM   table_name table_alias
     11           WHERE  table_alias.column_name LIKE parameter_name) LOOP
     12
     13           PIPE ROW (record_name);
     14        END LOOP;
     15
     16        RETURN;
     17     END function_name_pipelined;
     18
     19     FUNCTION function_name_refcursor (
     20        parameter_name IN VARCHAR2)
     21        RETURN sys_refcursor
     22     IS
     23        variable_name sys_refcursor;
     24     BEGIN
     25        OPEN variable_name FOR
     26           SELECT table_alias.*
     27           FROM   TABLE (package_name.function_name_pipelined (
     28                     parameter_name)) table_alias;
     29
     30        RETURN variable_name;
     31     END function_name_refcursor;
     32  END package_name;
     33  /
    
    Package body created.
    
    SQL> VARIABLE variable_name REFCURSOR;
    SQL> SET AUTOPRINT ON;
    SQL> BEGIN
      2     :variable_name := package_name.function_name_refcursor ('%A%');
      3  END;
      4  /
    
    PL/SQL procedure successfully completed.
    
    COLUMN_NAME
    -----------
    ALLEN
    WARD
    MARTIN
    BLAKE
    CLARK
    ADAMS
    JAMES
    
    7 rows selected.
    
    SQL> ALTER TABLE table_name ADD (new_column_name VARCHAR2 (1) DEFAULT 'X');
    
    Table altered.
    
    SQL> BEGIN
      2     :variable_name := package_name.function_name_refcursor ('%A%');
      3  END;
      4  /
    
    PL/SQL procedure successfully completed.
    
    COLUMN_NAME NEW_COLUMN_NAME
    ----------- ---------------
    ALLEN       X
    WARD        X
    MARTIN      X
    BLAKE       X
    CLARK       X
    ADAMS       X
    JAMES       X
    
    7 rows selected.
    
    SQL>
    
  • Why is there so little space at the top of the Firefox browser to move your cursor to your Favorites?

    At the top of the Firefox browser, there is a small amount of space to move your cursor to access the bookmarks. What goes in the new browser is that if you move a fraction of an inch incorrectly, you open the new tab instead of being able to get to the Favorites section, which is now to the right of access of the new tab. Therefore, return to the orange box of Firefox to try again. It gets mighty frustrating. More old Firefox users for many years which was very, very satisfied with the previous edition, I suggest a larger upper surface in which move your cursor around, or some sort of customaization of sizing being available, or the ability to use a 'classic' of Firefox edition. I am currently using Microsoft Vista. Thank you very much!

    I also find the new boring interface. Try this and see if you like it better: open the box orange of Firefox and go to the Options in this drop-down menu, select menu bar. Then you will have a more "classic" view

  • Router Cisco 877M ability to use UC technology?

    Hi all

    Router Cisco 877 M can cause functionality or the ability to use VOIP technology or UC?

    See you soon,.

    In the Cisco Small Business portfolio, we offer Smart Business Communications System (SBCS), which is a suite of products providing small business with UC.

    This includes remote teleworkers, namely SRI 871W and the SR520, if you need ADSL interface.  This includes the management GUI and configuration using the CCA (Cisco COnfiguration Assistant).   This suite of products have been designed and tested to work together and supported that was as well.

    You can introduce other products and attempt to interoperate, but you will drift away from the value added by sticking to patterns and best practice deployments, we recommend you.

    More on 8xx SRI:

    http://www.Cisco.com/en/us/products/ps6202/index.html

    More SR520 on:

    http://www.Cisco.com/en/us/products/ps9305/index.html

Maybe you are looking for