% NOTFOUND - Question on which the EXIT condition is placed right after a RECOVERY

I so a procedure that uses a cursor, but also a loop to output values as follows

LOOP

/ * Retrieve each row of the result of the request above for PL/SQL variables: * /.

EXTRACT AREA_CUR IN P_ID, P_LAST_NAME, P_DEPTH;

/ * If there are no rows to extract, exit the loop: * /.

WHEN THE OUTPUT AREA_CUR % NOTFOUND;
DBMS_OUTPUT. Put_line (' student: ' |) P_ID);
DBMS_OUTPUT. Put_line (' family name student: ' |) P_LAST_NAME);
DBMS_OUTPUT. Put_line ("depth: ' |") P_DEPTH);
END LOOP;

Currently, if I had to start my procedure I would like to get the output of

Schmidt
Burha

Who should

But I noticed that if I pass the EXIT statement at the end just before the end of the loop I get slightly different results

LOOP

/ * Retrieve each row of the result of the request above for PL/SQL variables: * /.

EXTRACT AREA_CUR IN P_ID, P_LAST_NAME, P_DEPTH;
DBMS_OUTPUT. Put_line (' student: ' |) P_ID);
DBMS_OUTPUT. Put_line (' family name student: ' |) P_LAST_NAME);
DBMS_OUTPUT. Put_line ("depth: ' |") P_DEPTH);

/ * If there are no rows to extract, exit the loop: * /.

WHEN THE OUTPUT AREA_CUR % NOTFOUND;

END LOOP;

I then get the results of

Schmidt
Buhra
Burha

What I understand after a FETCH statement is issued, it will take the current value of the line her in and then also the movement to the next line.

Why would he captures Burha twice?

Since the FETCH statement moves to the next line I would expect the output to look more to

Schmidt
Buhra
< White > (because that would be the new line)

Am I misunderstand this?

You say that since there is no value should be extracted in variables, then the variables in the FETCH stmt hold nulls, right? But he has no line (NOT EVEN NULL) must be extracted, so variables retain their values.
And % notfound is a Boolean attribute that returns false if the previous extraction returns a line * and this argument is set to true if she didn't, that's why we use exit after fetch statement, and not the end of loop; Or we can get different results, as in your case!

Mahanam

Tags: Database

Similar Questions

  • Cursor starts moving across the screen from left to right after the wake up the computer from standby or hibernation

    Original title: cursor goes wild

    My PC to 'wake up' sleep/hibernate, the cursor initially moving across the screen from left to right, in which window is open, destroy all the document is on the screen. I force Windows to close. How to solve this other than turning off standby/hibernation?

    Looks like the cursor of the mouse is very sensitive when the computer comes out of standby or hibernation.
    I suggest that you go in the mouse properties and lower the sensitivity and see if that helps.
    You also need to update any driver mouse if possible.

    Let us know if that helps.

    Marilyn

  • Weird question on which the machine virtual ESX 3.5i

    Hello world

    I have a question very very weird on 2 x HP DL380 G5 boxes with ESX 3.5i U3 loaded on each.

    The installation program:

    DL380 G5

    2 x Quad core

    2 x 72 GB Raid 1 + 0

    6 x 146 GB Raid5

    32 GB OF RAM

    I installed esx 3.5i u3 according to the normal, created vm. But when I copy data to a network in the virtual machine folder spikes the cpu and the virtual machine does not respond. What makes it worse, is if I copy a large file on the c: to another folder on c: VM does not - high cpu and ping meets about 200ms. vmdk bones all over the 72 GB Raid 1 + 0 datastore. When I add a data from the store of raid5 data drive the same phenomenon occurs. If I copy the c to this drive on the raid 5 data store the virtual machine gets does not and pings hover at about 200ms.

    Any ideas?

    I have no idea why this is happening, Ive deployed the same configuration with a bunch of vm and no problem.

    I don't think its network since you said that you have the same problem copy from c: to c: on the same machine.

    Looks like the machine is waiting for e/s finish. Check if you can see if I/O is blocked somewhere

    Are there messages in the system log of Windows indicating disk problems?

    Check your RAID controller. It is on the HCL?

    Your write cache is configured correctly?

    Arnim - van Lieshout

    -

  • I have some questions in which the typed characters appear in the wrong order when a non alpha-numeric character is used.

    For example, I type Florida Derby (G1), and the text appears) Florida Derby (G1. Also, I can't register my software. I bought the software and serial legally.

    Please reset the preferences for the places, names, file preference, Photoshop functions once. Photoshop CC 2014

  • Satellite M100-233: stops right after the "XP" logo

    Hello
    I have a Satellite M100-233 with XP Home Edition SP3 (in Portuguese)
    When it is connected to the mains and the battery is not fully charged, sometimes the yellow light does not shine.
    Check the voltmeter application when this happens, tells me that the battery is on, the energy source is the sector, but the battery runs down.
    As I continue to use the laptop, the amount of the battery is reported as progressively less, until he tends to zero, then the laptop just turned off, as if she was not connected to the mains.
    Even if I start with the battery charged to 100%, after a couple of hours (sometimes more, sometimes less) the same thing happens.

    From an authorized dealer, they told me that it was probably a short battery shorted out.

    Get not that: * if she take the battery out of the laptop and turn it on:
    -Most of the time it turns off right after the "XP" logo.
    -It seems that this happens more often when the battery was fully charged the last time that I used it (strange! "I imagine this?)
    -Also sometimes happens after that I use the laptop for a while

    The only unusual bios message I get is "no TPM or TPM has a problem." I guess it has to do with the cryptographic protection, so I imagine that this has nothing to do with this issue.
    About two years ago, there was a problem with the battery (it ceased to be recognized as present by the laptop) which has been repaired under warranty: they told me that they had replaced the motherboard then. However, at this time there that I could continue to work normally without the battery, which is not the case now.

    I would be grateful for any advice. The most annoying is that this problem follows an irregular pattern, and the diagnosis, the dealer gave me seems hard to believe. As I use my laptop to collect data for research abroad, it is quite a risk for me to use it if I can't be sure when it will turn off on its own.

    Hello

    To be honest, I doubt that anyone here in the forum would be able to provide an exactly the answer to this question
    I think that it of almost impossible to say what's wrong without running any hardware checks.

    But to me it looks like a card mother number possibly it s power of electronic power supply which is part of the motherboard.

    What to say, maybe you need a new motherboard, but the new mobo is an expensive item, and in my opinion, you should first check if it is s to replace the motherboard or buy a laptop second hand for the same money.

  • I have improved my 5 LR to LR CC 2015. I realized that the LR Catalog backup file (which accumulates during the exit process) fell 2.8 GB (LR 5) to 270 MB, probably due to compression. Can I be sure that the shrunk backup file contains everything what he

    I have improved my 5 LR to LR CC 2015. I realized that the LR Catalog backup file (which accumulates during the exit process) fell 2.8 GB (LR 5) to 270 MB, probably due to compression. Can I be confident that the shrunken backup file contains everything it should?

    Lightroom CC 2015 to zip the backup catalog file, it should be much smaller. So, based on what you said, I see no evidence that something has gone wrong.

  • concatenation error - when I use the value of the column of text in which the condition.

    Hello

    I'm creating Materialized view using a few columns from two tables and by obligation, I need to prepare a select statement with a where condition in another column. (new heading)

    I tried like below...

    create a materialized view HAND
    force refresh on demand
    as
    Select
    a.table_name,
    a.column_name,
    b.trial_name,
    ' Select * from ' | '. a.table_name |' where ' | a.column_name | ' = '|| b.trial_name | « ; » "QUERY".
    Of
    exp_csv_tB has,
    b exp_csv_tr;


    the value of name a.table is: monitoring_table
    a.column_name value is: study
    b.trial_name = fty777



    Materialized view created with an extra column, but it is not added "(codes) to the value of the text in which the condition.

    output I got is:

    Select * from monitoring_table where study = fty777;

    but

    I need output like

    Select * from monitoring_table where to study = "fty777";

    value of fty777 must be in the codes like "fty777". I read a few articles, but did not get this example.

    Help, please.

    You need to escape your quotes (double upward on quote)

    create materialized view MAIN
    refresh force on demand
    as
    select
    a.table_name,
    a.column_name,
    b.trial_name,
    'select * from '||a.table_name||' where '||a.column_name|| ' = '''|| b.trial_name||''';' "QUERY"
    from
    exp_csv_tB a,
    exp_csv_tr b;
    
  • Understand the dynamic conditions in which the clause

    Hi all
    I have a requirement where I need to dynamically register the conditions in which the clause based on the variable binding.

    My condition is like that.

    SELECT f.scheduled_date, a.bld_id, a.room_id, a.cage_id, f.test_num
    OF feeding_test_results f.
    v_onl_gf_anmls one
    WHERE f.sak_feeding_test_res > 5000000
    AND f.anml_id (+) = a.anml_id
    AND f.bld_id = 'A5 '.
    AND f.room_id > 0
    AND f.cage_id > '0'
    -case when: check_value = 1 Then
    "AND scheduled_date < = 16 April 2009"
    ' AND scheduled_date > = 6 April 2009.
    On the other
    AND scheduled_date = April 16, 2009"
    End
    AND f.feeding_status <>'X') f



    Kindly somebody help me how to do this.


    Thank you and best regards,
    P. Gesret Devi

    michaels2 wrote:

    and scheduled_date <= case when :check_value = 1 then date '2009-04-16' end
    and scheduled_date >= case when :check_value = 1 then date '2009-04-06' end
    and scheduled_date = case when not :check_value = 1 then date '2009-04-16' end
    

    Hmmm, maybe you want some NVL around these statements of cases such as...

           and scheduled_date <= NVL(case when :check_value = 1 then date '2009-04-16' end,scheduled_date)
           and scheduled_date >= NVL(case when :check_value = 1 then date '2009-04-06' end,scheduled_date)
           and scheduled_date = NVL(case when not :check_value = 1 then date '2009-04-16' end,,scheduled_date)
    

    or something like this. Otherwise the comparisons with null will just because all this to fail.

  • We can use EXISTS in which the condition

    Hi all
    We can use EXISTS (instead of IN) in which the status of a query that is not part of a subquery?

    for example:

    Update gpf_vou_sm set up_amt = 0 where src_cd ('1101 ', ' 1201');

    the application works very well with the IN instead of EXISTS operator.

    Everyone please help.


    Thomas k prakash

    Using in your case is better...

    Yu S.Nayef are right IN suits here because the values are known

  • less than or equal to the loop condition

    Hello

    What do you prefer, what's the most common one is more easily readable, less or equal in the loop condition?
    for (int i = 0; i < arr.lenght; i++){..}
    //or
    for (int i = 0; i <= arr.lenght - 1 ; i++){..}
    I know it's basic programming and nothing to do with Java, so if this forum is not for this, could you please suggest a general programming forum?
    I would really appreciate that I have a lot of General questions :)

    Thanks in advance,
    lemonboston

    lemonboston wrote:
    Hello

    What do you prefer

    Personal preferences, which is useless for you

    which is more common,

    From the years of reading code open source, the first

    one who is more easily readable, less or equal to the loop condition?

    Personal opinion, which is useless for you

    I would really appreciate that I have a lot of General questions :)

    If you don't want to think about yourself (which you should do instead of asking general questions), just lazily attack. The two examples reach exactly the same, but the first is less to type and read.

  • When bookmarking a page, I get the full list of files in the drop-down list to select any folder in which the bookmark page. What you set for complete list of folders in the bookmarks falling?

    When bookmarking a page, I can not get the list of files to drop down to select any folder in which the bookmark page. The "folder:" bar was showing "Bookmarks Menu". The arrow on the bar descends 5 recent folders which pages were saved, but pop arrow to the right of the bar down opens just to show the three categories and the button "new folder". What you set for complete list of folders in the bookmarks falling?

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of your modules is causing your problem (switch to the DEFAULT theme: Tools > Modules > themes).

    See the extensions, themes and problems of hardware acceleration to resolve common troubleshooting Firefox problems and troubleshooting questions with plugins like Flash or Java to solve common Firefox problems

    See also http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • L410: QUESTION: on upgrading the processor

    I know that updates not covered by the warranty; but my question is more specific. I have acquired several portable Thinkpad L410, all specced the same; Celeron T3000 2 GB of RAM and 160 GB HDD and BIOS to version 1.40.

    I intended to rehabilitate a couple and improve processors.

    My first attempt was to put a T7500 Penryn in one unit, booted up and went to check the bios settings... all the goo - recognized T7500. Saved and restarted but system stopped and said you need a different firmware. Not now, not knowing why I tried, I took the T7500 and put in a [obviously a more recent than the T7500 cpu] T6570 RESTARTED AND is GONE IN BIOS - recognized T6570. Saved and rebooted and this time continued, started in Windows Mobile. Running again the W.E.R. ANrating went after looks good and still being run like a champ.

    My question is; Why laptop request a different microcode for a T7500 and hold on to this moment there, still recognize and run with the cpu T6570 which is newer than the T6570 that does not need a different firmware? I checked the system update is an update of the bios to 1.45... but the already installed 1.40 is dated 6/08/2010...so why wouldn't the bios have the microcode for a T7500?

    Well, for starters, T7500 is not a Penryn processor - that's a Merom. That is why the different microcode.

    The original T3000 also belongs to the Penryn family.

    Seems simple enough for me.

  • The exit of the inner loop program

    Hi im new to Labview so that it sounds like an easy problem to solve.

    I'm simulating a signal and display on a graph when I click on a start button. But I can't understand how, to always be able to get out all of the output of a button program as im in the inner loop, which simulates the signal. When I click on the Exit button when a simulating nothing happens until I press the button to exit the inner loop.

    Here a small example vi showing my problem:

    Just follow a few simple rules:

    • Do not put interactive while loops inside events
    • Don't put not events within the events.

    You can use the outside loop while for everything.

    Some associates of threads:

    http://forums.NI.com/NI/board/message?board.ID=170&view=by_date_ascending&message.ID=388255#M388255

    http://forums.NI.com/NI/board/message?board.ID=170&view=by_date_ascending&message.ID=224817#M224817

    (there are many others)

  • PC Windows 7 on an area in which the reset default printer will be not.

    Original title: need to constantly reset the default printer

    I have a Windows 7 pc on an area in which the default Reset printer will not hold.  You constantly reset.  No idea how to hold?

    Hello

    If your system is connected to a domain, the question you posted would be better suited for the IT Pro TechNet public. I would recommend posting your query in the TechNet Forums to get help:

    TechNet forums various Windows 7

    Hope the helps of information.

    Let us know if you need help with Windows related issues. We will be happy to help you.

  • Error message: "Windows Media Player cannot access the file. The file may be in use, you won't have access to the computer on which the file is stored, or your proxy settings are may not be incorrect. »

    Original title: problems of residential group after system recovery

    I started a homegroup on my computer.  I added another computer to the homegroup.  Everything worked fine until I had to perform a system recovery on the laptop that I used to start the homegroup.  I implemented the homegroup again, but I can't access the files on the other computer via Windows Media Player.  I get an error message that says "Windows Media Player cannot access the file. The file may be in use, you won't have access to the computer on which the file is stored, or your proxy settings are may not be incorrect. "I can access all the music files via Windows Explorer.  I have to start over with a new password?  Can I just create a new homegroup?  What other options do I have?  You can provide any help would be greatly appreciated.  Thank you.

    Hello

    Please follow the methods and check the issue:

    Method 1:

    Open the homegroup troubleshooting utility:

    http://Windows.Microsoft.com/en-us/Windows7/open-the-HomeGroup-Troubleshooter

    Method 2:

    Why can't I access my homegroup? :

    http://Windows.Microsoft.com/en-us/Windows7/why-cant-I-access-my-HomeGroup

    For reference:

    Homegroup: frequently asked questions:

    http://Windows.Microsoft.com/is-is/Windows7/HomeGroup-frequently-asked-questions

    Method 3:

    See the steps in "include a folder shared in a library" from the link below:

    Access to files and printers on other homegroup computers: http://Windows.Microsoft.com/is-is/Windows7/access-files-and-printers-on-other-HomeGroup-computers

    I hope this helps.

Maybe you are looking for

  • can I print my list of stored passwords?

    I don't want to lose that when I move to a new computer. How can I print the list?

  • Pop up the new Satellite L855 - Windows is not genuine

    Sorry for my English.February 8, 2013, I bought my computer Toshiba L855 laptop with Windows 7 Home Premium pre-installed.For ten days, I get a pop-up that says that Windows is not genuine.Windows is activated. I checked with the software license key

  • My system says that I need Windows Recovery ADVANCED

    Original title: my system says I need Windows Recovery ADVANCED - what is it and how do I get it my system is locked and I can't access the Internet.  Thank you I and desktop HP - Windows XP - when it comes on no programs are listed.

  • Multiple WAN + several VLAN = hair loss

    Hello world We have a block of IP addresses of our ISP and I am using one for a network of comments, but I can not understand how to configure. X 2 (ending with 150 WAN IP address) should feed WAN X 0 (VLAN 1), and X 2 (ending with 151 WAN IP address

  • Existing port BB10 Webworks ask BBOS 6 and above devices

    Hi all Please guide me the easy steps to port my app BB10 BBOS 6 and above. My applications BB10 has features such as WCF service calls, Parsing XMl and JSON localstorage using format. and my file config.xml looks like at http://www.BlackBerry.com/ns