Handle the error to the deletion

Hello

I have a few 50 Delete simple SQL queries, such as
BEGIN
DECLARE
DELETE FROM where x=1;
DELETE FROM where x=2;
DELETE FROM where x=3;
.....
exception when others
then
dbms_output.put_line(sqlcode);
raise;

END;
now on the script error is culling but it is incorect:(je veux afficher l'erreur dans laquelle supprimer c'était, mais scipt besoin d'aller à la fin!)

Any help please!

Thank you!
ID.

Edited by: 1D10T on 10 April 2013 01:06

Edited by: 1D10T on 10 April 2013 01:06

Edited by: 1D10T on 10 April 2013 01:07

Edited by: 1D10T on 10 April 2013 01:07

Not if you want the rest of the SQL statement to succeed.

You could, of course, rewrite the SQL statement to update the individual lines in a PL/SQL loop and catch exceptions in this loop. It will be slower. And involve more code. So, it is not recommended.

And you should never write a handler exceptions as simply calls dbms_output. There is no guarantee that anyone will ever see dbms_output so it should never be invoked.

Justin

Tags: Database

Similar Questions

  • I CAN QUERY A TABLE EVEN AFTER THE DELETION OF THE DATA FILE

    Hello

    Can someone explain to me the reason why I am able to interview some tables even after the deletion of the data that are associated with file?

    SQL > select table_name, tablespace_name from dba_tables where owner = 'SCOTT ';

    TABLE_NAME, TABLESPACE_NAME

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

    TEST2 USERS

    TEST USERS

    SALGRADE USERS

    USERS OF BONUS

    USERS OF THE EMP

    USERS OF DEPT

    6 selected lines.

    SQL > exit

    Disconnected from the database to Oracle 11 g Enterprise Edition Release 11.2.0.1.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    [oracle@localhost orcl] $ rm /app/oracle/oradata/orcl/users01.dbf

    [oracle@localhost orcl] $ sqlplus scott/scott

    SQL * more: Production version 11.2.0.1.0 on Mon Mar 30 21:35:54 2015

    Copyright (c) 1982, 2009, Oracle.  All rights reserved.

    Connected to:

    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    SQL > select count (*) from test2;

    Select count (*) from test2

    *

    ERROR on line 1:

    ORA-01116: error opening the database file 4

    ORA-01110: data file 4: ' / app/oracle/oradata/orcl/users01.dbf'

    ORA-27041: could not open the file

    Linux error: 2: no such file or directory

    Additional information: 3

    SQL > select count (*) of the test;

    COUNT (*)

    ----------

    5000

    SQL >

    The first output is as expected. But why am I still able to query the table of test, even if the data file has been deleted.

    Hello

    The process of database have a file handle for the data file - this remains even when the file is deleted (it disappears from the normal file system navigation)

    You can see if you have lsof installed

    just try

    lsof | grep datafile_name

    Once the database is restarted and the released file handle so you will not be able to do this any more - and in fact you will get errors when it can't find the file.

    See you soon,.

    Rich

  • Not click on the Delete button in Standard OTL OAF page popup warning message

    Hello

    In the page OTL Standard by removing records from its files automatically remove all without showing YES/NO pop messages.

    So, I'm working on this requirement to get messages in context-click on the button.what deletion I did I extend the controller.

    Popup messaging is displayed but when click the Yes button folder is not the deletion.

    Thanks in advance.

    Standard code:

    ============

    ' Public Sub processFormRequest (OAPageContext oapagecontext, OAWebBean oawebbean)

    {

    super.processRequest (oapagecontext, oawebbean);

    DebugUtilities debugutilities = new DebugUtilities (oapagecontext);

    debugutilities.enterMethod (Thi, "processFormRequest");

    String s = oapagecontext.getParameter ("ShowTimecardSearch");

    If (s! = null & & s.equals("Y"))

    {

    oapagecontext.putParameter ("TimecardSearchDone", "Y");

    oapagecontext.redirectImmediately (oapagecontext.getCurrentUrlForRedirect (), true);

    }

    OAApplicationModule oaapplicationmodule = (oawebbean) oapagecontext.getApplicationModule;

    String s1 = (String) oapagecontext.getSessionValue ("TimecardSearchDone");

    String s2 = GlobalUtilities.getStringOrNullFromObject (oapagecontext.getParameter ("event"));

    If (s2! = null & & s2.equals ("DeleteAction"))

    {

    Object obj = null;

    If (s1! = null & & s1.equals("Y"))

    obj = (TimecardSearchVOImpl) oaapplicationmodule.findViewObject ("TimecardSearchVO");

    on the other

    obj = (TimecardsVOImpl) oaapplicationmodule.findViewObject ("TimecardsVO");

    ((OAViewObjectImpl) (obj)) .reset ();

    do

    {

    If (!) () (OAViewObjectImpl) (obj)). hasNext())

    break;

    Line = ((OAViewObjectImpl) (obj)) .next ();

    String s5 = (String) row.getAttribute ("DeleteChecked");

    If (s5! = null & & s5.equals("Y"))

    {

    String s7 = String.valueOf (row.getAttribute ("TimecardId"));

    HXCUtilities.deleteTimecard (oaapplicationmodule, s7);

    Row.Remove ();

    }

    } while (true);

    ((OAViewObjectImpl) (obj)) .setRangeStart (0);

    }

    ======================

    Code modified Contrller:

    ========================

    ' Public Sub processFormRequest (OAPageContext oapagecontext, OAWebBean oawebbean)

    {

    super.processRequest (oapagecontext, oawebbean);

    DebugUtilities debugutilities = new DebugUtilities (oapagecontext);

    debugutilities.enterMethod (Thi, "processFormRequest");

    String s = oapagecontext.getParameter ("ShowTimecardSearch");

    If (s! = null & & s.equals("Y"))

    {

    oapagecontext.putParameter ("TimecardSearchDone", "Y");

    oapagecontext.redirectImmediately (oapagecontext.getCurrentUrlForRedirect (), true);

    }

    OAApplicationModule oaapplicationmodule = (oawebbean) oapagecontext.getApplicationModule;

    String s1 = (String) oapagecontext.getSessionValue ("TimecardSearchDone");

    String s2 = GlobalUtilities.getStringOrNullFromObject (oapagecontext.getParameter ("event"));

    If (s2! = null & & s2.equals ("DeleteAction"))

    {

    oapagecontext.writeDiagnostics (Thi, "Enter in DeleteAction event param maton", 1);

    OAException mainMessage = new OAException ("HXC", "HXC_TCSEARCH_DEL_CONFIRM");

    oapagecontext.writeDiagnostics (Thi, "Enter in DeleteAction event param Manjunath1", 1);

    Note that even if we do our Yes / No button submit a

    form, yet it requires a non-null value in the yes/no constructor

    URL parameters for the buttons to make, so we spend just empty

    Channels for this.

    DialogPage OADialogPage = new OADialogPage (OAException.WARNING,

    mainMessage,

    NULL,

    "",

    "");

    oapagecontext.writeDiagnostics (Thi, "Enter in DeleteAction event param Manjunath2", 1);

    Always use Applications dictionary messages of all the channels you want

    display in your page.  Note that any text you have defined declaratively

    in the wake of the OA is directly translatable.

    String Yes = oapagecontext.getMessage ("AK", "FWK_TBX_T_YES", null);

    String number = oapagecontext.getMessage ("AK", "FWK_TBX_T_NO", null);

    We put this value, so the code that manages this key is

    descriptive.

    dialogPage.setOkButtonItemName ("DeleteYesButton");

    The following configures the Yes / No buttons to several buttons, validate

    and make sure that we handle the form submit the original

    (the summary "employees") of the page so that we can process the 'yes '.

    This controller selection button.

    dialogPage.setOkButtonToPost (true);

    dialogPage.setNoButtonToPost (true);

    dialogPage.setPostToCallingPage (true);

    Now define our yes/no labels instead of the default OK/Cancel.

    dialogPage.setOkButtonLabel (yes);

    dialogPage.setNoButtonLabel (no);

    oapagecontext.redirectToDialogPage (dialogPage);

    } else if (oapagecontext.getParameter ("DeleteYesButton")! = null)

    {

    oapagecontext.writeDiagnostics (Thi, "Enter in event param maton DeleteYesButton", 1);

    Object obj = null;

    If (s1! = null & & s1.equals("Y"))

    obj = (TimecardSearchVOImpl) oaapplicationmodule.findViewObject ("TimecardSearchVO");

    on the other

    obj = (TimecardsVOImpl) oaapplicationmodule.findViewObject ("TimecardsVO");

    ((OAViewObjectImpl) (obj)) .reset ();

    do

    {

    If (!) () (OAViewObjectImpl) (obj)). hasNext())

    break;

    Line = ((OAViewObjectImpl) (obj)) .next ();

    String s5 = (String) row.getAttribute ("DeleteChecked");

    If (s5! = null & & s5.equals("Y"))

    {

    String s7 = String.valueOf (row.getAttribute ("TimecardId"));

    HXCUtilities.deleteTimecard (oaapplicationmodule, s7);

    Row.Remove ();

    }

    } while (true);

    ((OAViewObjectImpl) (obj)) .setRangeStart (0);

    }

    Hello

    It seems that the ViewObject request is get executed once again on his return on the Page of the dialog box.

    Can you please do the following suggested changes and see what happens?

    1. change the processFormRequest. Add the threshold also

    dialogPage.setOkButtonItemName ("DeleteYesButton");

    dialogPage.setNoButtonItemName ("DeleteNoButton");

    2. change the processRequest as below:

    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    {
      if ((oapagecontext.getParameter("DeleteYesButton") == null) && oapagecontext.getParameter("DeleteNoButton") == null)
      {
      // Copy the entire processRequest Code here.
      }
    }
    

    Check out the link for more details below:

    Advice from the Oracle Johny: OAF: OA dialogue Page works not when Diagnostics FND profile is not defined

    Let us know what happens after this change.

    See you soon

    AJ

  • How to add the delete function to a report that is already created?

    Hey, guys:

    I'm not familiar with the form relative to the APEX. I have a lot of forms with the reports that has been created before, but they only create buttons. Now I need to add, edit and delete buttons. I wish I didn't have to recreate forms with reports. But when I tried to add the Remove feature by comparing a form with button Delete created by APEX, but it does not work. remove the button does not respond.

    parameter is as follows:

    style button: button model based
    model of button: button
    button type: normal

    Action: redirecting to a URL
    Run validation: No.
    Target URL: javascript:apex.confirm (htmldb_delete_message, 'DELETE');
    action of databases: SQL delete action

    condition type: point value / column in expression1 is not null
    expression1: P2172_ALIAS_ID

    I also activate the deletion in process: "SOR_ALIAS line process. '


    If I set the action of the button delete that submit the page, I can delete the line, but no standard popup alerts, could someone help me on this?

    Thank you.

    Sam

    Hello

    When you try to reproduce your problem, since all you posted was going well for me, I came across an error that htmldb_delete_message was not defined (you could check your browser console, usually by pressing F12 and select the console tab to see what happends when you press the button).
    Perhaps this is also the case in your configuration, simply replace the URL target with the text below to see if that's the problem.

    JavaScript:apex.confirm ("are you sure you want to delete this record?","REMOVE" ');

    Concerning
    Bottom

  • How to handle the exception in the OSB 11 g

    Hello

    In my project, level of service proxy must add exceptions, please inform me the steps.
    Please let me know

    Hello

    Proxy handling OSB service error is possible in 4 ways.

    Stage - manages all the errors in a stadium.

    Pipeline - manages all the errors in a pipeline, as well as all errors not managed any stage in a pipeline.

    Service - manages all the errors in a proxy service, and errors not managed in a pipeline in a service. All errors of WS-Security are addressed at this level.

    System - handles all errors that are not anywhere else in a managed pipeline.

    You can find more info on links below.
    http://docs.Oracle.com/CD/E21764_01/doc.1111/e15867/modelingmessageflow.htm#i1040168
    http://svgonugu.WordPress.com/2011/06/15/fault-handling-in-OSB/

    See you soon,.
    Durga

  • Where will the deleted files!

    I can't print my side windows, so I send files to my Mac via a connection from Server (smb://my ip address) for printing.  On mac, I deleted a file in the shared folder and really needed again, but he does not appear in the Recycle Bin of my mac or windows.  any ideas?

    Thanks in advance.

    apassala wrote:

    A warning came saying the file will be removed from paques1861, and if it should continue... but I thought it would be MOVED immediately into the trash...

    Well you can not say you were not warned.  Being deleted and moved to the "Trash" or "Recycle Bin" are not then same thing and already stressed Robert with shared network files deleted immediately just as according to the warning message.

    When a file is deleted if it was direct delete or havening been sent to the "trash" and or 'Recycle Bin' and then emptied the computer, physical or virtual according to file the deleted file system was on, it reboot immediately with the appropriate recovery disk containing the software needed to restore or recover the deleted file then from this moment forward diminish the chances for the success of the recovery.  Even a immediately restart with the recovery disk appropriate containing the software needed to restore or recover the deleted file does not guarantee recovery will be successful, however, it is at this time the best chance occurs and it goes down from there.

    Thus, if it is not prepared to handle this situation by having the tools at hand and or cannot use another computer to set up the necessary tools to deal with a problem like this then lets hope an a a backup of the file.

  • What is happening in the original file of the photo when I import it in Photos and I have the "Delete after import" box checked?

    What is happening in the original file of the photo when I import it in Photos and I have the "Delete after import" box checked?

    When organizing photos for Photos for Mac app, I find that the Photos makes "copies" of files within the library of Photos and must reference a file if your settings are such that you do not copy the original files in the Photos app.

    Trying to manage the disk space for the Macbook Pro.

    The delete after import is available only when you import a device - a camera, card, an iPhone, but not when you import files from a folder on the system drive.

    You can delete the local image files of your system drive yourself, once you have imported the Photos and they were copied in the photo library.

    I would never use the option "delete after Import. The files will be deleted until you can check if the files have been imported correctly. If you find out later, that some of the imported files are corupted and illegible, it will be repeated o toolate import, because the files have been deleted from the device. Or worse, if pictures should plant a reason any during the import, all the pictures will be lost, if you have enabled "delete after import.

  • DDoes iCloud keeps the deleted content to your iPhone (thus allowing you to free up space on your phone, but keep the content)?

    DDoes iCloud keeps the deleted content to your iPhone (thus allowing you to free up space on your phone, but keep the content)?

    N ° once you delete data from iCloud, it is deleted from your phone.

  • Can I use the delete button to remove photos from the library (that is, any computer) when I'm in the album view?

    I like to use the album view to find the photos I don't want and it is easy to just hit delete. However, these pictures are just removed from the album, not the library. Configure the delete key to delete these photos of the whole library instead?

    Hold down the command key by pressing the button Delete. Then the picture will be deletedd and not just removed the library.

  • Am I able to configure a wireless iMac keyboard to emulate the way a Windows keyboard responds to a depression of the DELETE keys and BACKSPACE?

    Am I able to configure a wireless iMac keyboard to emulate the way a Windows keyboard responds to a depression of the DELETE keys and BACKSPACE? I want to delete either to the left right GOLD of the cursor. By pressing the DELETE key on Mac does remove one way, but I want the ability to delete in both directions. The Windows keyboard provides a delete key to remove to the right and a key to return back to remove to the left. So I can configure an iMac for this keyboard? My thought is to keep the delete key as it is and ADD a new function to one of the function keys to delete characters to the left. Thanks for your time and your help.

    Mac can go both ways, in case this is useful.  You can use fn more delete to delete to the right.  Also control more.

  • When I delete mail in my Inbox, it doesn't go into the deleted folder?

    MacBook Pro, Mac OS X (10.7.1) el Capitan version 10.11.15

    When I delete mail in my Inbox, it does not seem to go in the folder deleted... or should I say it seems to go the deleted folder, but when I click on the Inbox and in a different Inbox address when I get back deleted emails appear to have made their reappearance?

    Concerning

    KGB

    You can follow an article from apple: Mail (Yosemite): If the project, unwanted, sent and deleted messages aren't where you expect

  • Why will not erase the deleted messages in Thunderbird in FACT?

    This problem does not exist on my other computer or my phone when I delete imap messages, but when I delete this computer, even if it appears in the Trash of Thunderbird folder on this computer, it is not actually go in webmail or on any other device. Any ideas? Thank you.

    Re: when I delete emails from Thunderbird on the computer in question, they appear in the trash on this computer, but they do not actually delete from the server, they remain in the original folder (Inbox, sent).

    Quote:
    It is ideal for a message erased on an IMAP account or visible in webmail or other e-mail clients. Deleting a message just sets a flag, and it's the interface chart user what to do when there is a message when this flag is set. However, once Thunderbird compact (expurgated) this folder, the deleted message shouldn't be visible more webmail or any mail client, because it has been deleted physically.

    IMAP accounts offer several options to delete messages that are not available in the accounts pop tools-> account-> server settings settings-> "when I delete a message" a choice for "Move to trash", "Mark as deleted" and "withdraw immediately".
    end of quote.

    More information about the different methods are detailed on the link:

    If you right-click on the eg: Inbox folder and select "compact", this should eliminate the traces of the deleted messages.

    to compact a file: right-click on a folder and select "compact".

    to compact all folders: file > Compact folders

    you set up the auto strike?
    Tools-> account settings-> server to select imap e-mail account settings: clean up ("Expunge") Inbox on exit that compress the Inbox folder when you exit Thunderbird. If you check 'Empty trash on exit' will also empty and compact the deleted items folder when you quit.

  • I can not find the deleted messages in the trash can I have with outlook express

    I am unable to find the deleted messages in the trash can as I could when using internet explore how do I do in mozilla?


  • Records related to the deleted email accounts are not deleted.

    Thunderbird (currently 24.6.0, Windows) current account settings window shows the folders the and RSS for RSS. I used to have 2 email accounts, but a long time ago I stopped using Thunderbird for them. When I removed the using the button 'delete account '. They were (and are) no longer appear.
    The other day, I went to transfer Thunderbird settings using MozBackup to another system. On this system, I could see the two accounts (including e-mail messages).
    Then, I checked in the Thunderbird profiles folder in Application Data. The accounts were still there.
    So my question is - how do I completely remove old email accounts. I read elsewhere that the e-mail account cannot be deleted. But the sub account in the profile folder folders can be deleted without causing other problems?

    Folder

    mail \server name
    IMAPMail\server name
    

    Delete server name records removes any residual mail account.

    Note the deletion of such a dossier for an active account is something of a disaster.

    See http://kb.mozillazine.org/Recovering_deleted_mail_accounts what you ask, but says file name a bit

  • Recently, the delete key and rt click on remove does not remove a message. Must restart you Bird to be able to delete a message. With the help of v 24.5.0

    Using Thunderbird 24.5.0, W7, patches up-to-date

    The DELETE key or right-click delete suddenly does not remove a messsage.

    Restart Thunderbird and then they both work.

    What should I look for?

    File is not very large and simply restart brought the function.

    But, as a note aside, I don't have the problem in the last two days.

    Don't know what has changed. However.

  • Deleted messages do not always go to the deleted mailbox

    Sometimes when I press the button Delete Message After reading an e-mail, don't go to the basket, he completely disappears. Of course, this seems to happen that on email I want to retrieve later < smile >.

    Thunderbird has a feature to bypass the Recycle Bin. This happens when you hold down the SHIFT key while pressing the delete key. Perhaps you are unintentionally hold down the SHIFT key?

    Other than that, it could be a display setting. Make sure that view > son is set to all.

Maybe you are looking for