Implicit cursor with Oracle 9i R2

Hello

I tried to use an implicit cursor:

FOR rowProduct, SELECT ProductID, ProductName FROM T_Product
LOOP
Dbms_output.put_line(rowProduct.ProductID ||) '. Name = ' | rowProduct.ProductName);
END LOOP;

And the procedure fails to compile with error:

Error (55,22): PLS-00103: encountered the symbol "SELECT" when waiting for him
one of the following values: (- + case mod new null < an ID > < a)
quotation marks double identifier defined by the > < a variable binding > reverse avg County
current max min prior sql stddev sum variance execute forall fusion < a
SQL statement > timestamp date of the time interval < a string literal
specification of character set > < number > < a SQL string between single quotes >
lead the symbol "(" has been replaced by "SELECT" to continue.


I had to declare the cursor first and use FOR rowProduct IN csrProduct to make it work.

Question: Is it because the implicit cursor was not integrated into Oracle 9i R2?

Thanks in advance for any help.

You just join the query in parentheses, i.e.

FOR rowProduct IN (SELECT ProductID, ProductName FROM T_Product)
LOOP
  ...
END LOOP;

Justin

Tags: Database

Similar Questions

  • implicit cursor and type oracle

    Hi all

    Is it possible to copy a rowtype of a cursor implicit to an oracle type?

    example of

    create or replace type test_123 (as_of_date date, number of contrat_number) as an object;

    declare

    help_ty test_123;

    Start

    for r1 in (select as_of_date, contract contracts) loop

    help_ty: = r1;

    end loop;

    end;

    It is said that it may not be possible, can you help me please?

    11g

    concerning

    Hello

    You can declare it in the Package specification and can use in the world through the database.

    As below

    create or replace package test_pkg
    is

    type is record (varchar2 (40) first_name, employee_id number);

    end;
    /

    declare

    l_rec test_pkg.emp_rec;

    Start

    for r1 in (select first_name, number of employees)
    loop

    l_rec: = r1;
    dbms_output.put_line (l_rec.first_name);

    end loop;

    end;
    /

    Post edited by: Suri - example added

  • Error with implicit cursor

    I am writing an implicit cursor and when I run that she grant an exception that cannot use Contine.


    FOR (IN) getUseDetailRec
    SELECT
    bill_seg_read.tou_cd, bill_seg_read. BSEG_ID,
    -end v2.4 *.
    reg_read.read_type_flg ReadType,
    bill_seg_read.start_reg_reading StartMeterRead,
    bill_seg_read.end_reg_reading EndMeterRead,
    -(NVL(bill_seg_read.end_reg_reading,0) - NVL(bill_seg_read.start_reg_reading,0)) quantity.
    Reg.uom_cd,
    bill_seg_read.final_reg_qty
    OF ps_ci_bseg_read bill_seg_read,.
    ps_ci_reg reg,
    ps_ci_reg_read reg_read
    WHERE reg.reg_id = reg_read.reg_id
    AND bill_seg_read.start_reg_read_id = reg_read.reg_read_id
    AND bill_seg_read.bseg_id = getReadIntervalRec.bseg_id
    AND bill_seg_read.sp_id = getElectmeterRec.sp_id
    AND bill_seg_read.end_read_dttm = getExchgRec.end_read_dttm
    AND reg.mtr_id = getExchgRec.mtr_id)

    LOOP
    -Start v2.4 *.
    If in getReadIntervalRec.rs_cd ("E-R-TOU", "E-ND-TOU") and getUseDetailRec.tou_cd =' ' then

    CONTINUE;
    end if;

    If not in getReadIntervalRec.rs_cd ("E-R-TOU", "E-ND-TOU") and getUseDetailRec.tou_cd <>' ' then

    CONTINUE;
    end if;

    Any help or suggestion is greatly appreciated.

    Thank you

    CONTINUES is available in 11g only. What is your version of Oracle? Always show the version and the exact error message!

    SY.

  • What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?

    What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?

    A cursor that has been declared with the clause WITH HOLD, after the word CURSOR remains open after a COMMIT or a ROLLBACK. The following example shows how to use the following clause:

         EXEC SQL          DECLARE C1 CURSOR WITH HOLD          FOR SELECT ENAME FROM EMP          WHERE EMPNO BETWEEN 7600 AND 7700      END-EXEC.
    

    The cursor must not be declared for the UPDATE. The WITH HOLD clause is used in DB2 to override the default, which is to close all cursors on validation. Pro * COBOL provides this clause in order to facilitate the migration of applications to DB2 to Oracle. When MODE = ANSI, use Oracle DB2 default, but all host variables must be declared in a declare Section.

    Reference:

    Oracle documentation!
    http://docs.Oracle.com/CD/B10501_01/AppDev.920/a96109/pco03dbc.htm

  • Microsoft Visual Studio 2012 with Oracle database

    Hello!

    I'm a developer Oracle of Pakistan. Currently, I have a lot of desktop applications. Now, I want to develop web applications for which I think to use Microsoft Visual Studio 2012 with Oracle Database 11 g on the back-end.

    Please guide me on the software/hardware required for Microsofot Visual Studio 2012 and also to confirm the compatibility between Microsoft Visual Studio 2012 with Oracle database.

    Concerning

    Mohammed Uzair

    Oracle APEX developer

    Oracle applications developer

    + 92 (333) 7058754

    Hello

    I suggest you post the same question in the Microsoft Visual Studio category in the Microsoft MSDN forum for assistance.

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

  • Control chart cursor with keyboard

    Is there a way to move the cursor with the keyboard arrowsbuilt in graphics? If this isn't the case, I think it would be simple to do with the dynamic event record. If the user clicks on the graph, save the events during the arrows button and use the down arrows to move the cursor some default step size. How can only problem, I determine when the user has clicked everywhere except on the graph (graph lost focus) to unregister the key down events? The only way I can think of is to use a component-based mouse event and calculate if the mouse coordinates are on the chart control, and if they are, then don't unsubscribe the events down button again.

    Hello

    I did small example to move the cursor by using the keyboard.

    What I've done is, you press F10 to access the keyboard mode and move the slider or just as you mentioned, click on the graph, it will start

    move the cursor with the keys and when you click anywhere else in the public Service, it will stop that.

    I would like to know if that's what you want.

  • I can't boot into windows xp. The windows logo comes on but then a black screen blank (you can see and move the cursor with the mouse however) is displayed.

    I can't boot into windows xp. The windows logo comes on but then a black screen blank (you can see and move the cursor with the mouse however) is displayed.

    anesvet,
    I'm going to sound like I'm repeating myself tonight... (see previous 4 posts...)  but try this:

    When you start start pressing F8 until you get the Windows startup options.  Then try "Last known good configuration" see if that helps.  If this does not work, try to F * then try to go to Safe Mode.  If those who do not help, I would start with your XP CD to recovery mode and run "chkdsk/r" then "sfc/scannow".  QQ learn manage!

  • Change the problem of direction of the cursor with new 2nd monitor

    original title: problem of direction of the cursor with new 2nd monitor

    I just added a 2nd monitor to my computer. The 2nd monitor is left of my laptop but I have to move the cursor to the right in order to get on the new monitor. How can I change so I can just move my cursor to the left and get it on my new 2nd monitor?

    Right-click on the desktop and then clicking display settings by clicking Customize to open the display settings. In the display settings box, click and drag the image to the monitor 2 to the left of the screen 1. Click on the button apply, then check. Click Ok to exit.

  • Need help to unlock the user account HR in the example (rich Web Applications with Oracle ADF development)

    I am very new to Java development and have tried to launch the sample application (Development of Web Applications with Oracle ADF rich) in the start-up, the author of this app has advised developers to unlock the HR user account.

    What I did to connect to Oracle as user = system/password = system and running this SQL command 'ALTER USER HR IDENTIFIED BY NewPwd ACCOUNT UNLOCK"in Sqlplus and with a return code 2.

    Don't code 2: success or failure?

    However, the HR user is always unlocked after issuing this command, and can someone please tell me what I'm doing wrong?

    Thank you.

    Timo,

    Thanks for confirming. The essential difference is that the command must be run as

    SYS AS SYSDBA

    instead of such as SYSTEM

  • Integration of the OPA 10.4 with Oracle E-business Suite

    We have a requirement for the integration of the OPA 10.4 with Oracle E - business suite.

    The condition is hypocritical:

    (1) EBS can call rules of the takeover bid on any screen - I think that this will be achieved by Oracle determinations Server (ODS) with probably a middleware between both to facilitate the exchange of webservice.

    Request- I just wanted to know if there is another way to better or if it is only best option?

    Are there examples of projects or pointers that can help us get a better understanding of the present?

    (2) given certain conditions of release in EBS, the modules of the OPA may be invoked, but this time there may be a few involved OPA interview screens.

    Request- How to proceed and achieve this goal?

    Any help on the above queries is really appreciated.

    (1) it is for an older version of OPA, but you might find something useful in this tutorial.

    (2) launch a browser window in passing a single parameter "caseid" to OPA startsession URL, so that a data adapter that you write can load and save data interviews of EBS based on the id of the object.

  • Y at - it DB Oracle options that do not work with Oracle Apex

    Hi team,

    Y at - it options Oracle DB (DB audit vault wall and fire. HCC, advanced... Security etc) which will not work with Oracle Apex. Please let us know of a few documents if you

    Thank you kindly,

    Hi Rhine23,

    Rhine23 wrote:

    Y at - it options Oracle DB (DB audit vault wall and fire. HCC, advanced... Security etc) which will not work with Oracle Apex. Please let us know of a few documents if you

    It's the kind of question that can be answered with My Oracle Support | First Oracle Support or you can write to the APEX [email protected] about this application development team.

    Also, see the "Support" section at the end of the page Oracle Application Express - downloads.

    I hope this helps!

    Kind regards

    Kiran

  • Tell Oracle webcenter 11.1.1.8 integrate with oracle EBS 12

    Dear friends,

    I use content oracle web center 11.1.1.8.0 and I want to integrate with Oracle EBS R12 1.3. I'm unable to find any step guide / tutorial from any side. Each of you would provide all my prior instructions and step by step to perform this activity successfully.

    Thank you

    Kind regards

    Riaz Ahmed

    Anand, should I have any /patch fixpack to exercise this activity.

    Kind regards

    Riaz Ahmed

  • Create schemas for data warehouse for Reporting with Oracle XE

    It is possible to import home charger with the Oracle XE database and dw?

    I get this error ORA-00439: feature not enabled not: progress of replication in the log of the CIM.

    I saw that the database, we do not have have the feature "advanced replication."

    SQL> select * from v $ option where parameter = 'Advanced replication';
    
    
    PARAMETER
    -------------------------------------------------- --------------
    VALUE
    -------------------------------------------------- --------------
    advanced replication
    FALSE
    
    
    

    Journal of the CIM:

    Mon Feb 23 14:16 BRT 2015 1424711760686 atg.cim.database.dbsetup.CimDBJobManager module of high level of information for Reporting data warehouse Datasource list page: domain controllers. DW, ARF. DW.base, ARF. DW. InternalUsers, Store.Storefront

    Info my Feb 23 14:16:05 BRT 2015 1424711765012 atg.cim.database.dbsetup.CimDBJobManager 0 0 imports has not been executed.

    Info my Feb 23 14:16:05 BRT 2015 1424711765192 atg.cim.database.dbsetup.CimDBJobManager list of module level for Datasource Reporting charger: DafEar.Admin, DCS. DW, DCS. PublishingAgent, ARF.base, Store.EStore, Store.EStore.International

    Info my Feb 23 14:16:05 BRT 2015 1424711765733 atg.cim.database.dbsetup.CimDBJobManager 1 1 imports has not been executed.

    Info my Feb 23 14:16:05 BRT 2015 1424711765953 atg.cim.database.dbsetup.CimDBJobManager list of top level for Datasource Publishing module: DCS - UI. Versioned, BIZUI, PubPortlet, DafEar.admin, DCS - UI. SiteAdmin.Versioned, SiteAdmin.Versioned, DCS. Versioned, DCS - UI, Store.EStore.Versioned, Store.Storefront, DAF. Endeca.Index.Versioned, DCS. Endeca.Index.Versioned, ARF.base, DCS. Endeca.Index.SKUIndexing, Store.EStore.International.Versioned, Store.Mobile, Store.Mobile.Versioned, Store.Endeca.International, Store.KnowledgeBase.International, Portal.paf, Store.Storefront

    Info my Feb 23 14:16:11 BRT 2015 1424711771561 atg.cim.database.dbsetup.CimDBJobManager 65 65 imports has not been executed.

    Info my Feb 23 14:16:11 BRT 2015 1424711771722 atg.cim.database.dbsetup.CimDBJobManager list of top level for Datasource Production Core module: Store.EStore.International, DafEar.Admin, DPS, DSS, DCS. PublishingAgent, DCS. AbandonedOrderServices, DAF. Endeca.Index, DCS. Endeca.Index, Store.Endeca.Index, DAF. Endeca.Assembler, ARF.base, PublishingAgent, DCS. Endeca.Index.SKUIndexing,Store.Storefront,Store.EStore.International,Store.Recommendations,Store.Mobile,Store.Endeca.International,Store.Fluoroscope,Store.KnowledgeBase.International,Store.Mobile.Recommendations,Store.Mobile.International,Store.EStore,Store.Recommendations.International

    Info my Feb 23 14:16:12 1424711772473 2015 BRT atg.cim.database.dbsetup.CimDBJobManager 30 30 imports has not been executed.

    Info my Feb 23 14:16:19 BRT 2015 1424711779573 atg.cim.database.dbsetup.CimDBJobManager creating schema to the Reporting data warehouse data source

    Info my Feb 23 14:16:19 BRT 2015 1424711779653 atg.cim.database.dbsetup.CimDBJobManager list of top level for Datasource Reporting data warehouse module: domain controllers. DW, ARF. DW.base, ARF. DW. InternalUsers, Store.Storefront

    Info my Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager DatabaseTask Create for Module ARF. DW.base, sql/db_components/oracle/arf_ddl.sql

    Info my Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager DatabaseTask Create for Module ARF. DW.base, sql/db_components/oracle/arf_view_ddl.sql

    Info my Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager DatabaseTask Create for Module ARF. DW.base, sql/db_components/oracle/arf_init.sql

    Info my Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager Create DatabaseTask Module domain controller. DW, sql/db_components/oracle/arf_dcs_ddl.sql

    Info my Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager Create DatabaseTask Module domain controller. DW, sql/db_components/oracle/arf_dcs_view_ddl.sql * info my Feb 23 14:16:19 BRT 2015 1424711779993 atg.cim.database.dbsetup.CimDBJobManager Create DatabaseTask Module domain controller. DW, sql/db_components/oracle/arf_dcs_init.sql

    Info my Feb 23 14:16:21 atg.cim.database.dbsetup.CimDBJobManager BRT 2015 1424711781085 found 2 of the 6 unrun previously of tasks for Datasource Reporting data warehouse

    Info my Feb 23 14:16:21 BRT 2015 1424711781085 atg.cim.database.dbsetup.CimDBJobManager 1 ARF. DW.base: sql/db_components/oracle/arf_view_ddl.sql

    Info my Feb 23 14:16:21 atg.cim.database.dbsetup.CimDBJobManager 1424711781085 2015 BRT 2 domain controllers. DW: sql/db_components/oracle/arf_dcs_view_ddl.sql

    Info my Feb 23 14:16:21 BRT 2015 1424711781085/atg/dynamo/dbsetup/job/DatabaseJobManager starting work of setting up data 1424711781085.

    Error my Feb 23 14:16:21 BRT 2015 1424711781516 /atg/dynamo/dbsetup/database/DatabaseOperationManager---java.sql.SQLException: ORA-00439: feature not enabled not: Advanced replication

    is there a solution?

    Hello

    We have not tested and certified with Oracle XE internally

    You must use an Oracle Enterprise Edition for Advanced Replication

    What version of Oracle trade you install, I can't say extract of newspaper, you've posted

    ++++

    Thank you

    Gareth

    Please indicate any update as "Good response" or "Useful answer" If this update help and answers your question, so that others can identify the correct/good update between the many updates.

  • Using Oracle Partition Exchange with Oracle Data Integrator (ODI) 11g

    Hello

    I'm trying to follow http://www.ateam-oracle.com/configuring-oracle-data-integrator-odi-with-oracle-partition-exchange/

    But impossible to get the same options in 11g.

    Can I use the Exchange Partition Oracle 11g ODI.

    Thank you.

    Yes, exchange of partition is certainly possible in ODI 11 g

  • Migration oracle db user of an operating system to any other user of system operating in an environment of rhel 6 with oracle 11.2.0.3.0

    Hi all

    Migration of oracle db user of an operating system to any other user of system operating in an environment of rhel 6 with oracle 11.2.0.3.0.

    Suppose I have a database running with os user user1

    I have another user user2 where I want the database runs and not on User1

    Please let me know how to achieve this goal,

    Thank you.

    Have you looked on the MOS for this?

    I thought to do exactly this, but ultimately I didn't actually accomplish. Despite the fact, it may be an interesting feature...

    Something like this:

    S ' ensure that two users are members of the same groups

    -Database stop

    -As the former owner, change the ownership of all files in Oracle Home, inventory of the Oracle and all data files, to the new. On Linux/Unix, only the owner (and root) can change the ownership of files, so all files/directories not belonging is not to the former user, will obtain authorization refuses, legitimately so. The new user for example cannot 'take' the files, because they are not his. Only the old can 'give' files. Of course, root can do as well, if you have this permission.

    -Configure the new user to set up the environment correctly (ORACLE_HOME,..)

    -Start of the database

    -Do NOT remove the old user of the system, but do not give him a different password

    That's what I think

Maybe you are looking for