Slider with return return clause

Hello

What is the use of the cursor with return return clause?


Thank you

REDA

Hello

The return clause lets you create a specification for the cursor and always hide the implementation.

So you can write in the specification of the package:

CURSOR emp_cur (empno IN emp.empno%TYPE) RETURN emp%ROWTYPE;

And then put in place the cursor in the body, as usual.

Read all the docs
http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14261/packages.htm#LNPLS00910

Concerning
Peter

Tags: Database

Similar Questions

  • Form trigger error ORA-22816: feature not supported with RETURNING clause

    Hi Apex developers.

    I created the form to the poster with the INSTEAD of trigger. Everything works very well for the UPDATE and DELETE. But to INSERT the "automatic line (DML) treatment" trigger ORA-22816: feature not supported with RETURNING clause. When I disable the INSTEAD OF trigger it start work very well too. But I have to use INSTEAD OF trigger for safety reasons.

    Meet someone too the question?

    What is workaroud for the question?

    Thank you very much.

    Michaud

    Hi Martin,

    MMH, it beats me. You could try with tracing active sql (add & ptrace = YES to your URL), see what actually running.

    Cordially Jens

  • ORA-22816: feature not supported with RETURNING clause

    <!-StartFragment--> java.sql.SQLException: ORA-02014: cannot select the UPDATES view DISTINCT, GROUP BY, etc.

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)

    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)

    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)

    at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:503)

    at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:1029)

    at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)

    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1126)

    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)

    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3043)

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelect(OracleSQLBuilderImpl.java:730)

    at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:5594)

    at oracle.apps.fnd.framework.server.OAEntityImpl.doSelect (unknown Source)

    Hello

    I had the resolution of the following link

    EODefImpl.java to implement so that EO
    and override the createDef() method.

    Public Sub createDef()
    {
    super.createDef ();
    setUseReturningClause (false);
    }

    Thank you

    AP

    ORA-22816 - feature not supported with clause of returning OFFICER (EO)

  • Insert statements with return Clause

    Hello

    Insert unfavourable with election clause as DML:

    Insert into my_table (Col_name) Values ("Some Column value specific") return X to y;

    What does this statement exacly. There is therefore a lot of example but I didn't easily find meaning.

    Please help me understand this.

    Kind regards

    Abgrall

    Abgrall wrote:
    After insertion, this means a line in the table and getting some value from the column of this new line inserted?

    Yes, exactly that.

  • update columns in the return clause

    Hi gurus

    Need your new for my purpose of learning. I have the sample data.

    Examples of data

    DROP TABLE plch_parts;

    CREATE TABLE plch_parts

    (

    partNum NUMBER,

    partName VARCHAR2 (100),

    changed_on DATE

    );

    ---------------------------

    Insertion

    BEGIN
    INSERT INTO plch_parts (partnum, partname)
    VALUES (1, 'handle');

    INSERT INTO plch_parts (partnum, partname)
    VALUES (100, 'hinge');

    INSERT INTO plch_parts (partnum, partname)
    VALUES (500, 'lock');

    COMMIT;
    END;

    ----------------------------

    DECLARE

    TYPE parts_t

    IS

    RECORD

    (

    partNum NUMBER,

    partName VARCHAR2 (100));

    l_part parts_t;

    BEGIN

    UPDATE plch_parts

    PartName SET = UPPER (partname)

    -WHERE partnum = 1

    RETURN partnum,

    partName

    IN l_part;

    Dbms_output.put_line (' Changed: ' | l_part.partnum |) '-' || l_part.PartName);

    END;

    -------------

    Error

    ORA-01422: exact fetch returns more than number of lines

    -------------------

    I know the above code to support only 1 sheet update, my question is that how to I print records of all updates, I tried to use bulk collect with return clause but as Miss me something.

    Please guide.

    Concerning

    Shu

    set serveroutput on size 2000
    declare
      --
      type parts_record is record (
        partnum  number,
        partname varchar2(100)
      );
      --
      type parts_table is table of parts_record index by pls_integer;
      changed_parts parts_table;
    begin
      --
      update plch_parts set partname  = upper (partname)
      returning partnum, partname bulk collect into changed_parts;
      --
      for i in changed_parts.first .. changed_parts.last
      loop
        dbms_output.put_line('Changed #' || changed_parts(i).partnum || ': ' || changed_parts(i).partname);
      end loop;
    end;
    /
    
    anonymous block completed
    Changed #1: DOORKNOB
    Changed #100: HINGE
    Changed #500: LOCK
    

    Please read http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#LNPLS005

  • OCIEnvCreate failed with return code-1, but the text of the error message was not available. »

    OCIEnvCreate failed with return code-1, but the text of the error message was not available. »

    I get this message (error) after update my customer Oracle 9.0 to 10.1 (used in the .net Oracle connection)

    I would like to get a resolution? If someone has experiece with her.

    THX

    Hello

    To improve assistance to this subject, you can ask your question in the MSDN Forums.

    NET Framework

    http://social.msdn.Microsoft.com/forums/en-us/category/netdevelopment

  • ODI-1217: SILOS_SIL_APTRANSACTIONFACT_REVERSE_DIFFMANLOAD Session (5782500) fails with return code 20942

    Anyone knows under error; or tips on how to get additional information; or how to find exposed as false:

    I ODI BIAPPS finance and I get similar errors to 4 steps.

    The steps that are errors:

    -SILOS_SIL_APTRANSACTIONFACT_REVERSE_DIFFMANLOAD

    -SILOS_SIL_ARTRANSACTIONFACT_REVERSE_DIFFMANLOAD

    -SILOS_SIL_GLCOGSFACT_REVERSE_DIFFMANLOAD

    -SILOS_SIL_GLREVENUEFACT_REVERSE_DIFFMANLOAD

    Mistakes are similar for all four.

    It is an example of one of them:

    Return code 20942

    ODI-1217: SILOS_SIL_GLREVENUEFACT_REVERSE_DIFFMANLOAD Session (5777500) fails with return code 20942.

    ODI-1226: Exception raised step Diagnostics fail after 1 attempt.

    ODI-1232: Diagnostics Exception raise execution fails.

    ODI-1228: task Diagnostics raise Exception (procedure) fails on the target of ORACLE BIAPPS_DW connection.

    Caused by: java.sql.SQLException: ORA-20942: this task has failed and could not be autocorrected. Please see full ODI operator log for the error message real = > ORA-20942:

    ORA-06512: at line 49

    to oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462) to oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405) to oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931) to oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481) to oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205) to oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548) to oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217) to oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1115) to oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488) to oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769) to oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3954) to oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1539) to oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163) to oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102) to oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1) to oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50) to com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2925) to com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2637) to com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577) to com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468) to com.sunopsis.dwg.dbobj.SnpSession.treatSession) SnpSession.java:2093 (oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor) $2.doAction(StartSessRequestProcessor.java:380) to oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216) to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:312) to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor (StartSessRequestProcessor.java:304) $(StartSessRequestProcessor.java:874) StartSessTask.doExecute to oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:133) to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:84) at java.lang.Thread.run (Thread.java:745))

    In studio ODI or console ODI I would identify the stage failed and the code behind it by looking at well as operator and the journal of the session. Usually these errors are low for the code changes or new scenarios of data when the code has not changed for example have you changed interfaces ODI, what version of BI Apps are you using, is it a full charge or incremetnal and was this job before?

    Thank you

    Roy

  • What is the role of the RETURN clause in a pipeline service?

    I wrote several functions in pipeline and they work fine without the return clause. However, in the oracle documentation he returns in pipeline positions:
    CREATE FUNCTION StockPivot(p refcur_pkg.refcur_t) RETURN TickerTypeSet
    PIPELINED IS
      out_rec TickerType := TickerType(NULL,NULL,NULL);
      in_rec p%ROWTYPE;
    BEGIN
      LOOP
        FETCH p INTO in_rec; 
        EXIT WHEN p%NOTFOUND;
        -- first row
        out_rec.ticker := in_rec.Ticker;
        out_rec.PriceType := 'O';
        out_rec.price := in_rec.OpenPrice;
        PIPE ROW(out_rec);
        -- second row
        out_rec.PriceType := 'C';   
        out_rec.Price := in_rec.ClosePrice;
        PIPE ROW(out_rec);
      END LOOP;
      CLOSE p;
      RETURN;
    END;
    /
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e10765/pipe_paral_tbl.htm#CHDJEGHC

    In addition, at least in PL/SQL developer I receive advice that my pipeline functions return no values, well as I said features operate smoothly. So is it necessary in the return clause in the functions of pipeline or is redundant?

    My version of oracle is 11.2.0.2.0

    You can find it in the documentation (you linked):

    A function table pipeline must have a RETURN statement that does not return a value. The RETURN statement transfers control to the customer and ensures that the next extraction Gets an exception NO_DATA_FOUND.

    HM

  • With the help of the POLL with Execute Immediate clause

    I wrote a query to update a table and return the column in a variable of type table nested using the return clause but its not working, I am getting error like

    ORA-06550: line 66, column 22:
    PLS-00306: wrong number or types of arguments in the call to ' |'
    ORA-06550: line 66, column 4:
    PL/SQL: Statement ignored

    I get the error message in part of my request to the suite

    || "RETURN If_row_status in bulk collect INTO"
    || v_if_row_status;


    Referred to as v_if_row_status-
    TYPE v_count IS the TABLE OF varchar2 (50) INDEX directory.
    v_if_row_status v_count;

    The original message listed error about concatenation, but the code in response to scott.wesley had no concatenation. Have you tried to revise the update process? What is a different issue, unrelated to the first?

    The best thing to do would be to create a cursor, loop through it and use a simple update for each row. Updates complex as the one you are trying to use are very difficult to manage. By using a loop to insert/update, you can have control over the process and have access to all values, you must use more later in advance instead of having to use the RETURN clause.

    Insert bulk can be more effective, but is difficult to manage for the great updates.

  • Is the old puzzle slide with the Rainbow Apple logo always around here?

    Is the old puzzle slide with the Rainbow Apple logo always around here?

    For people who still have the old Mac OS 9, it is, but you must before mid-2006 PowerPC Mac to run it in classic, or to get a such a Mac ROM to install with a program called Sheepshaver.  Depending on your country, get a such ROM cannot be legal.

  • Slide with several digital poster Down filter event Bug button?

    A key event filter on a slide with several digital screens down does not work as expected when not waived. If you for example tab of this slide with two digital screens digital display, the cursor remains on his position, rather than get KeyFocus to the next control. Same behavior at fault if you want to move the cursor on the left/right keyboard, nothing happens. Anyone an idea why?

    A simulation of that VI is attached. All other controls, a Slide with a digital display or a standard digital control, the key Down event filter behaves as expected... I tested in versions 8.5.1 LV (attachment), LV2012SP1 and LV2013.

    A teammate now found a solution or workaround. We do not know if this is the way it should be, if yes, then it's a bit hidden, but it works!

    It seems that the cursor needs to know on what digital display the FocusObj is when you use the event notifier KeyDown. Then, when to get the reference of the digital display active and the wiring of this reference to the terminal FocusObj filter event everything works as expected, numbers of tabs, typed, cursor etc and have to filter and notify events structure to the event.

    A vi and a printscreen are attached.

    The question is probably due to the specialty of slides and the class NumericWithScale in general, as its digital displays are a little under References and during the implementation of the features of event KeyDown for the class NumericWithScale filter, LV simply does not know on which side of the main action control part must be executed.

    Or someone has a better solution and explanation?

  • Need help with dynamic where clause.

    Hello world.  I'm kind of a novice with PL/SQL, so please be patient with me.  I am building a web application using Weblogic Oracle 11 g and Oracle database.

    To make a long story short, I need to generate the complex dynamic WHERE clause.  I don't know what will be the name of the column or the operator of comparison or the value will be until the moment of execution.

    I'm not 100% certain, but I think I need to use dynamic SQL statements.  Unless there is a better way to do it.

    I'm sure that using dynamic SQL opens me up to SQL injection attacks if I use simple string concatenation.  I would like to use bind variable if possible.

    In any case, it seems like trying to build a dynamic where clause does not seem to work as I want it would be...

    bv1 := 'colA = 5 and colB >= 9';
    
    query_str := 'SELECT * FROM view WHERE :bv1';
    
    OPEN CUR FOR query_str USING bv1;
    

    The code above pours out when I try to run it.

    Is there a way to build dynamic where the provisions without the use of concatenation of simple string that leaves me open to attacks by SQL injection?

    Thank you

    Hello.  I have read briefly upward on things, you suggested, but it seems a bit abstract for me since I was a novice.

    Can you give us an explanation or an example of how to use it to accomplish what I need to do?

    Do ypu really plan create a query with a WHERE clause that contains a predicate for all possible columns?

    Variable bind offer performance when the same query is executed several times with different values for bind variables.

    Select * from emp where empno =: v_empno

    After the first run Oracle will always be this query in the library cache. The next running can use the version of the cache even if the bind value is different.

    Select * from emp where empno =: v_empno;

    Select * from emp where ename =: v_ename;

    Select * from emp where sal =: v_sal;

    Each one is a DIFFERENT query. Yes - each of them uses a variable binding, but queries are different.

    So, if your username select EMPNO, an '=', and a value from the first query can be executed. But the next time that the user can select the ENAME column so that 'stored' first request may not be used given that the query does not match.

    The third time your user selects SAL so none of the first two queries can be used in the library cache. The use of bind variables gives performance during the SAME QUERY is used multiple times with DIFFERENT values for the variable binding. Oracle is not to analyze the hard query everything simply because the VALUE is different.

    So bind variables do not help you if most of the queries were completely DIFFERENT sets of predicates. And SYS_CONTEXT will not help either since that simply provides a way to define binds the values of the variables.

    Just for the simple example above, there are at least SIX possible combinations of columns that could choose your user name: empno, ename, sal, empno ename, empno & sal, ename & sal

  • Its mixed? While playing the slide with audio, if the customer has hit a tab with audio interaction, two sounds will play together. How to avoid what is happening?

    While playing the slide with audio, if the customer has hit a tab with audio interaction, two sounds play together, which is not a good customer experience.

    How to avoid what is happening? Placing a marker can help, but cannot solve the problem when the compliant/no intentional user, press tab.


    Better, if the presenter can triggle tab automatically at some point, or click interaction, no game bar function.

    Hi Louie,

    My sincere apologies for not being able to help on your previous question.

    Now, that the Interactions are concerned, they were initially designed to be placed as standalone content on the slide.

    Also if you try to resize your interaction and place it on the slide as well as other content/objects released published will always give a priority to the Interaction that it deemed to be a specific slide of Interaction.

    In the previous project, you shared, you try to time the Interaction with PowerPoint animations and wanted it to appear later on the set of slides, rather than on the start. But, as explained above, presenter honored not this setting in your project, because he in fact has considered a slide of interaction and display interaction since the beginning of the slide room itself.

    Also the number listed in this thread is concerned, there is no direct way to do it but I would like to suggest something that might help.

    If you want to keep the interaction on your slide and other content, Interaction will be available at the beginning of the slide. Surely there is no way that delaying his appearance, but you can still use animation related to Interaction in another goal. Within your presentation-> playback option settings, you can enable the feature of 'Pause after each animation' (see screenshot below). It will essentially help you achieve the function of auto-faisant a break from your animations, using your narration would automatically stop, just before you claim in your narrative and inform the learner to click on the different tabs of the Interaction. All you have to do is your narration and animation correctly so that the slide play does not break too many times in the time interval. Hope you find the idea of what I'm trying to say.

    Please mark this answer as being correct, if you find it useful. We would certainly look at such scenarios to be achievable directly at the request of our updates and later version.

    Thank you

    Zeeshan Hussain

    Adobe Presenter Engineering Team

  • Master slide with the scenario, reference, reference active / disable

    I have a model of slides with this little built in purple overlay:

    The three icons are smart shape filled with image buttons that play white in the bearing and States out of service.

    I want to use them on slides unguided practice for:

    • Scenario - Toggle text caption. Scenario is checked by default on a previous slide in its entirety, it would be a reminder for the slides, that it applies to (good for several slides)
    • Tip - Toggle text caption. Used when the learner gets stuck, sort of a hint of specific workflow (changes slide to slide)
    • Reference - link. Open a tool of work with step by step instructions.

    I would like to use variables so I could control to show exactly when these rockers are used on each slide, and I guess that I need stocks advanced on my model of slides.

    How can I do this?

    Long ago, I explained a similar workflow in these forums and blog on this subject:

    'Beat the system' - save time by creating advanced Actions (Captivate) - Captivate blog

    It is the workflow, I'd certainly use for the Tip:

    1. create a v_hint of user variables
    2. insert this variable in a text container on the first slide where you need (form or legend, I always mention that, because the shape is much more flexible for the style) and don't forget to adjust the length as high as possible. in previous versions maximum number of characters in a variable used to 256, but Rod pointed out, it is now lower (about 150)
    3. make this large enough text container, so that it can have your longer index and the time for the rest of the project, always on top.
    4. Create the action of the show/hide button that container (have several blog on shape toggle buttons)
    5. Create a joint action or a tip action that must be triggered by pressing enter for each slide where you want the features. It will be quite simple: assign v_hint with «...» ' (text you want for that slide being in the indicator); I would have preferred a shared action on a bunch of advanced duplicate actions because they save on the size of the file, and you can manage the library

    You can use the same approach (with a different user variable) for the script, but due to the limitation of the length of a variable and the fact that you have only 3 different versions, I would argue just to have 3 different, but still timed text containers for the rest of the project and always on top.

    With respect to the URL, I'm afraid you will have to use JS. I think that TLCMediaDesign (David Crawford) posted on this workflow.  Publish to HTML or SWF? There are widgets autour.

  • Apple and Adobe fixed the problem of ink and slides with iPad 2 Air again! It's summer is really long!

    I wonder what the updates on the issue of ink and slides with iPad 2 Air, has been set yet! It's summer is really long!

    No - Sorry to say. But it loks like a case of death for me. We use all this money on paper and pens next time I will wait 1-2 years before trying to summarize fancy gadgets / hardware from Apple / Adobe - I'll stick to Wacom for sure.

Maybe you are looking for