How to handle the case of zero insert line?

11.2.0.2, I want to insert into a table and you want to handle the case where the zero line is inserted. I use the following code and hope an exception is caught and let me have the chance to do something
set serveroutput on
begin
insert into his2051 select * from his2051  where today not in ( select distinct today from his2051 );
 EXCEPTION
    WHEN NO_DATA_FOUND THEN
        DBMS_OUTPUT.PUT_LINE('NO_DATA_FOUND exception ' );       
    WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('OTHERS exception ' );       
end;
The block runs OK, but not seen release. How to handle the case of insertion of line 0?

This will do what you want:

set serveroutput on
begin
insert into his2051 select * from his2051  where today not in ( select distinct today from his2051 );
 if SQL%ROWCOUNT = 0 THEN
        DBMS_OUTPUT.PUT_LINE('%rowcount must be  [' || SQL%ROWCOUNT || '].' );
        DBMS_OUTPUT.PUT_LINE('NO_DATA_FOUND - but won't cause an exception ' );
 END IF;
 EXCEPTION
    WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('OTHERS exception ' );
end;

Tags: Database

Similar Questions

  • How to handle the case end good app?

    Hello

    I'm creating an application for BB Storm2 5.0 device. I have a function to maintain a custom in app menu item native contacts, and clicking from there, brings to my screen of the application. It works very well.

    Problem occurs in the following steps:

    Steps to follow:

    1. start my native element menu contacts application, launch my app successfully screen.

    2. then if I press the red button, launching the device home screen.

    3 then run on the native Contacts application once again, throw my request directly instead of native contacts.

    Because in step 1, I launched my application screen in the menu contacts native. Because it does not have closed earlier, lance on native contacts spear my request.

    Anyone explain how can I handle this situation?

    Thank you.

    What amrishodiq said, this isn't 100% correct.  Let me correct that, then explain what you see:

    You can add the ApplicationMenuItems without even starting your Application, by doing this in the treatment of hand (.).  If your application is present or not is irrelevant.  In fact, if you add them to the start of your application, you can get several added entries, must be careful about this.

    What amrishodiq said about the red button and the usual methods of closing an Application is correct.  If you really want to exit your Application, is to call System.exit (.).  This happens automatically if you use the screen and you close the last screen in the stack to display.

    That said, you're doing something completely different here.

    You run in a Menu of Application element.  This menu item runs your code, but it is actually run by the Contact Application.  That's why, when press the red button and then relaunch the application contact, you view your screen.  If you had an icon for your Application and you have clicked on that right now, you will see a different screen.

    In this case, if your screen called System.exit (.), he was closing the Contacts Application.

    The problem of the listeners and ApplicationMenuItems running in the Application they are related is something that comes up quite often on this forum.  You really need move on to your own application and process the contact in there.  There are complications with it, make it seem easier to do what you're doing, that is just run your screens under enforcement Contacts.  However, I would recommend that you look at putting in a global events in the context of switch for your application, I think it's a better long-term solution.

  • How to remove the case of Tecra A3X

    Hello

    Could someone tell me how to get the case apart on my laptop?
    I took all the screws and it still won't fall apart.

    The problem is that following machine does not start.
    I removed the hard drive and it works fine in another machine, so im thinking that it might be the on-board battery?

    Mike
    Any answer welcome

    Hello

    Why do you think battery BIOS (RTC) failure?
    You get an error like "verification system. Then press F1? "

    If you do not receive this error message your RTC battery is ok!

    I think it is a very bad idea to disassemble the laptop, if you don't know what the problem is and how to do it!
    There is a high risk that you would harm other parts of the laptop.
    I think you should ask the ASP in your country to control the laptop!

    Good bye

  • How to open the case or take the panels on a desktop HP A6202

    How to open the case or take the panels on a desktop HP A6202

    Just a manual for the love of God or an image. Now I searched the Net for an hour - no luck

    See this guide HP titled "opening the box" for instructions on how to open the case. Be aware that there are several "HP a6202" computers and your may be different than what I have listed. Please provide the full name of the HP model and/or the product name of the computer in question during a request for assistance.

  • How to open the case of a 15-g020ca hp?

    How to open the case of a 15-g020ca hp? I would like to replace the hard drive. The screws in the back seem to do nothing. It appears no release (or torque) seems them to have no effect on anything.

    Hello:

    Here is the link to the service manual for your laptop.

    http://h10032.www1.HP.com/CTG/manual/c04162986.PDF

    Read the applicable removal procedures section parts and replacement.

  • How to handle the onTriggered many ActionItem created dynamically

    Hi, I created the ActionItem dynamically using (loop)

    because data is from webservice

    How to handle the onTrigerred?

    If my code is like this:

    for (int i = 0; i)< alist.count();="">

    {

    My page page * = iRoot-->findChild ("SpecificObject");
    ActionItem * action = ActionItem::create () .title (aList [i] .name);

    bool res = QObject::connect (action, SIGNAL (triggered ()), this, SLOT (handleAction (())); what I'm confused because I don't know what action is triggered
    Q_ASSERT (res);
    Q_UNUSED (res);

    my page-> addAction (action, ActionBarPlacement:efault);

    }

    MyClass::handleAction() Sub

    {

    aFunction(); This parameter of function required of aList, said user.user aList [i]

    }

    Do I need to create handleAction() as well as added actionItem SLOT

    But I don't know how much action added because it is dynamic server

    Thank you

    There are a few options:

    Create a single location and connect all the signals. You can then call sender() into the slot to retrieve the object that sent the signal and go from there. You can also use a QSignalMap that maps each signal to a value and send this value to a single location. You can also use QSignalMap::sender() to get the sender object.

    I used the QSignalMap to do something similar for handling created dynamically successfully drop-down lists.

  • DV7 - 3067cl, how to open the case and clean the fan?

    Where to find a manual that shows you how to open the case to clean the fan?

    Thank you!

    Hello

    It is not easier to do component, but the procedure is detailed from on Page 94 of your & Maintenance Guide.

    Kind regards

    DP - K

  • How to open the case of a HP Pavilion a1657c

    The fan of my graphics (nVidia) is extremely low. I read on the internet that some blowing dust out of the inside of the Tower will help this problem. The thing is, I can't get the thing open dang. I removed a few screws, but there is a kind of ring in the way and I can't find out how to remove or bypass it. Is there anyone who knows full instructions on how to open the case?

    ThelielFK wrote: my (nVidia) graphics card fan is extremely low. I read on the internet that some blowing dust out of the inside of the Tower will help this problem. The thing is, I can't get the thing open dang. I removed a few screws, but there is a kind of ring in the way and I can't find out how to remove or bypass it. Is there anyone who knows full instructions on how to open the case?

    Hello ThelielFK, here is the link that has information on how to access the system by removing the side panel.

  • How to reset the timer to zero?

    Good day people,

    How to reset the timer to zero?

    I have a button in the timeline relative to the code below, and when I click on it I want to the behavior of the time back to 1 or 0.

    Click the timer to 1 or 0.

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

    contents_mc - timer_txt

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

    _root.elapseTime = 0;

    intervalId = setInterval (this, "countDown", 1000);

    function countDown() {}

    {if (_root.timerOn)}

    ++ _root.elapseTime;

    " _root.elapseTime = _time +" "seconds";

    if(_root.elapseTime == 10) {}

    _parent.gotoAndStop ("GameOutOfTime");

    clearInterval (intervalId);

    }

    }

    }

    Stop();

    Any response will be appreciated,

    Thank you

    use:

    function resetF (): Void {}

    clearInterval (intervalID);

    intervalId = setInterval (countDown, 1000);

    }

  • How to use the Group feature in insert or update

    Hai All

    How to use the Group feature in insert or update statement

    I'm generating attendance so I have a different set of timing example

    0800,1200,1230, 1700 and I need to insert data into the table that contains the intimate value min and max value for

    outtime and othere to inertval time in or out

    Pls tell me with some examples


    For example

    For INSERT

    Insert into T2 (barcode, empcode, respondent, attend_date)
    values (R2.cardn, R2.enpno, min(R2.) PtIMe), R2.pdate);


    Update

    Update dail_att set outtime = MAX (r2.ptime) where empcode = r2.enpno and barcode = r2.cardn and
    attend_date = r2.pdate;


    Here, in the place where I used to have so pls tell how to use

    Thanks and greetings

    Srikkanth.M

    Hi Srikkanth.M

    to insert:

    insert into test (dummy) values ((select max (dummy) to double));

    Update:

    Update test dummy value = (select max (dummy) to double where to test them. XXXXField = double. XXXXField);

  • How to make the default text size and line spacing in small Sticky Notes?

    How to make the default text size and line spacing in small Sticky Notes

    Hello

    I suggest that you try the method below and check if it helps.

    Method 1: analysis of auditor of file system (CFS)

    System File Checker is a Windows utility that allows users to find corruptions in Windows system files and restore the damaged files. To perform a scan of the SFC, check out the link: https://support.microsoft.com/en-us/kb/929833.

    Note: the steps for Windows 8/8.1, works perfectly with Windows 10.

    Method 2: clean boot

    A clean boot is executed to start Windows by using a minimal set of drivers and startup programs. This will eliminate software conflicts that occur when you install a program, an update or when you run a program in Windows. Follow the link to perform the clean boot: https://support.microsoft.com/en-us/kb/929135.

    Kind regards

    Angelo bar

    Microsoft community

  • Satellite M30X how to open the case?

    Can someone tell me step by step, how to do to open the suitcase so that I can work the power connector? I tried to open it, but I'm afraid to do sth. bad... I pulled all the bolts and started to open the case, but in the middle and at the back it is tied with the Platinum.

    Thank you

    Gemorra

    Hello

    First of all if you open Notepad, you will lose the warranty.
    Second, before you remove the covers it of necessary to remove all the devices option. (battery, hard drive, diving, etc.)
    It is important to remove the keyboard, as usually the screws under the keyboard protect the lower lid. In addition, the screws on the underside of the laptop must be removed.
    Well, that's all I know and if you want to know more details, so please ask to the ASP.

  • Toshiba Satellite 5200 - how to open the case?

    Hello

    I have a Toshiba portable computer Satellite 5200 903.
    Here's my problem:

    My laptop is getting very hot, even it is idling. This is because the cooler got very dirty over time. And if the case/CPU-fan runs all the time, but no air comes out there.
    Now, I would open the case and clean the cooler. But for some reason, it is not possible. I removed all the screws in the back, in the Bay of battery and the hard drive Bay, but it's not working. So I think there must be some other screws, maybe next to the powerbutton on the top under a blanket. But I don't know how to remove this cover, without breaking.
    Or maybe I'm totally wrong and missed something else.
    I hope someone can help me.

    And sorry for my bad English.

    Thanks in advance.

    schlady

    Hello

    in my expierence the screws on each NB arranged differently and I would disadvice you open the NB to yours!

    In my opinion, it will be the best way to the NB to a Toshiba Service partner. They have the kowledge how to open each specific model and change the FAN!

    This will cost money, but you can be sure that it works after the check-up!

    You can find the following Service partner
    https://EU.computers.Toshiba-Europe.com - Support & download and find an authorized Service partner!

    Goodbye, Sam

  • How to open the case of a slate 3400US 7 HD?

    I have a HP Slate HD 3400US and want to open the back to change the battery.
    There are actually several different models of 7 slate,
    and there are a few YouTube videos showing the dismantling,
    but they are NOT the 3400US, but a different model of 7 Slate.

    The 3400US has no screws on the outside and the back fits perfectly
    on the rest of the Tablet, then it not there no openings or cracks
    where I can stick a small screwdriver in.

    I don't want to raise at random inside because that would leave nicknames
    on the edge of the case, and I might end up inadvertently break.

    There must be a hidden somewhere tab that would free up the back.
    Does anyone know how to get inside?

    Thanks for any help.

    ...

    Hello

    The SECOND manual from the following link shows you how (#18 page):

    http://h10025.www1.HP.com/ewfrf/wc/manualCategory?cc=us&LC=en&product=6608634

    Good luck.

  • How to open the case of my Pavilion safely to clean inside?

    I have a Vista laptop computer model pavilion dv7/1130ae or 1130ea I want to open the case and clean the fan because ha strenge like a voice engine, so I need a video or a picture to show me how I can open and clean safely.

    Not really a WIndows Vista * software * question - more than one * must read your manual * question, huh?

    Frankly - buy some air canned, turn off the laptop, blow air in all the vents, you can find all possible directions.  In your case, I just think that this a more sensible choice.

Maybe you are looking for