Check for delete operation

Hi All,
I'm doing a delete from a table. How can I check if the delete deleted any rows?
Thanks in advance
Bn

I'm guessing that you want to check SQL%ROWCOUNT immediately following the DELETE statement (if you are not in a PL/SQL block when you issue the DELETE, your client API likely has a different call to get this information).
BEGIN
  DELETE FROM some_table
   WHERE some_column = some_value;
  IF( SQL%ROWCOUNT = 0 )
  THEN
    dbms_output.put_line( 'No rows were deleted' );
  ELSE
    dbms_output.put_line( 'We deleted some rows' );
  END IF;
END;Justin

Similar Messages

  • Texts not checked for deletion are deleted

    whenever I delete texts and pictures on iPad or iPhone 6, even texts and pictures I DO NOT check for deletion are deleted anyway

    Maybe a bug with PCL driver explained (but not corrected) in this [Note 724912 - OTF driver: Command sequence different after upgrade|http://service.sap.com/sap/support/notes/724912]
    It's normal that it dumps between select/endselect with the old debugger. Try to use the new debugger if it exists in ECC 5 (it should exist as it corresponds to basis 6.40 if I remember well).
    You may activate sapscript debug from SE71 menu.

  • Usage of triggers for delete operation

    Hi,
    I have a table named tst_employee:
    CREATE TABLE TST_EMPLOYEE
    (EMPLOYEE_ID NUMBER,
    NAME VARCHAR2(100),
    DEPT_ID NUMBER,
    AGE NUMBER,
    DOB DATE,
    DESIGNATION VARCHAR2(50),
    ADDRESS VARCHAR2(1000),
    UPDATED_BY NUMBER,
    UPDATED_DATE DATE,
    APP_SOURCE_CODE VARCHAR2(3),
    ACTIVE_IND VARCHAR2(1));
    And another table for storing the audit records as:
    CREATE TABLE TST_AUDIT
    (AUDIT_ID NUMBER,
    EMPLOYEE_ID NUMBER,
    FIELD_ID NUMBER,
    FIELD_DESCR VARCHAR2(50),
    TRAN_TYPE VARCHAR2(1),
    BEFORE_VALUE VARCHAR2(1000),
    AFTER_VALUE VARCHAR2(1000),
    BEFORE_DATE DATE,
    AFTER_DATE DATE,
    APP_SOURCE_CODE VARCHAR2(3),
    UPDATED_BY NUMBER);
    Now on the event of insert, update or delete I want to capture the data in the audit table. This is for the monitoring purpose. Now the problem which I have is in the delete operation. When a record is deleted I want to capture who is deleting the record in the column TST_AUDIT.UPDATED_BY. Can you please suggest the options how can I do this. I am using Oracle 10g.

    Row level triggers offer :OLD.column_name and :NEW.column_name. For insert :OLD.column_name is always null and :NEW.column_name constains inserted/to be inserted value. In case of update :OLD.column_name is value before update and :NEW.column_name constains updated/to be updated value. In case of delete :OLD.column_name is deleted/to be deleted value and :NEW.column_name is always null.
    SY.

  • Cannot delete emails: no circle to check for delete

    More often than not I cannot delete emails from my iPhone.  When I choose edit no circle appears to allow me to delete emails.
    Any advice is appreicated.

    You can also delete the messages by swiping your finger to the right and the delete button should appear. However, if the way to delete is not appearing when you touch the edit button, you need to try some troubleshooting steps.
    First, power the iPhone off/on. See if that fixes it.
    If not, then reset the iPhone. Do this by holding the sleep/wake and home buttons together until you see the Apple logo, then release. After the iPhone restarts, try again.
    If not, then a restore is next. Restore from a backup in iTunes. If no better, then restore as a new iPhone.
    The reset has no affect on your data. A restore from backup does not affect data, however restoring as a new phone will delete everything off the phone. You will have to resync all of your data back to the phone.

  • When I change the folder for deleted files will files sent there be deleted as well?

    Hello! I selected the tick at forwarding mails. And I also checked (✓) for deleting those mails. In addition I selected to send deleted e-mails to a new folder. Now the name of the new folder is behind the bin symbol (). Will mails in the new folder be deleted after 30 days or will they stay. I want them to stay, so if there is a different way to forwand and mark the mails as read, I would be happy if you could tell me!

    The solutions is either of the following:
    Adobe Lightroom - Find moved or missing files and folders
    Copy the photos back into the exact same folder and folder location that they were in before
    I don't know what you actually did "when I pasted it back" ... but the bigger issue is that you shouldn't be working with these files in your operating system, period. Once you import them into Lightroom, you don't manage these files in your operating system.

  • When will there be fix for AirPrint in Yosemite? I cannot use my HP printer. I have uninstalled/resinstalled everything you can think of. I have deleted and added my printer more time than I can count. I have checked for updates. Nothing has worked.

    When will there be fix for AirPrint? Since upgrading to Yosemite I cannot print from my MacBook Air which I use mostly. (I can print from the my old 2005 G5 desktop and iPad2 just fine on the same network.) I could print just fine when I had Mavericks. I have tried EVERYTHING under the sun: resetting print system, deleting and adding the printer, checking for updates, uninstalling and reinstalling printer software and folders, turning off modem, router etc. NOTHING works.
    The laptop shows that it is printing but nothing happens. Then it says it cannot locate the printer or there is a broken pipe. But it does tell me that I have a low level in one of the ink cartridges (which is true.)
    Help! I have warned everyone I know not to upgrade. Is there a way to go back to Mavericks?
    MacBook Air (mid 2012), OS 10.10,  HP Officejet 7500a

    This is what appeared on Console:
    11/12/14 12:42:32.558 PM com.apple.preference.printfax.remoteservice[3099]: <NSViewServiceMarshal: 0x7fa398514bd0> failed to complete rights grant 6B212CA9-7872-4726-BA05-68BD5C994479 due to 3
    timestamp: 12:42:32.557 Wednesday 12 November 2014
    process/thread/queue: com.apple.preference.printfax.remoteservice (3099) / 0x7fff78cb4300 / com.apple.main-thread
    code: line 834 of /SourceCache/ViewBridge/ViewBridge-99/NSViewServiceMarshal.m in -[NSViewServiceMarshal invalidateWindowRights]
    #exceptions
    11/12/14 12:42:32.598 PM com.apple.xpc.launchd[1]: (com.apple.preference.printfax.remoteservice[3099]) Service exited due to signal: Killed: 9
    11/12/14 12:42:37.845 PM com.apple.appkit.xpc.openAndSavePanelService[3298]: assertion failed: 14A389: libxpc.dylib + 97940 [9437C02E-A07B-38C8-91CB-299FAA63083D]: 0x89
    11/12/14 12:42:37.879 PM sandboxd[246]: ([3295]) Pages(3295) deny file-read-data /Users/Mom/Downloads/CONM 136 - Study Guide Test 3 (2014).docx
    11/12/14 12:42:37.971 PM sandboxd[246]: ([3295]) Pages(3295) deny file-read-data /Users/Mom/Downloads/12%20angry%20men.docx
    11/12/14 12:42:38.033 PM sandboxd[246]: ([3295]) Pages(3295) deny file-read-data /Users/Mom/Downloads/Quiz%20#2.docx
    11/12/14 12:42:39.712 PM sandboxd[246]: ([3295]) Pages(3295) deny file-read-data /Users/Mom/Downloads/12%20angry%20men.docx
    11/12/14 12:42:39.000 PM kernel[0]: Sandbox: Pages(3295) deny file-read-data /Users/Mom/Downloads/Quiz%20#2.docx
    11/12/14 12:42:39.748 PM sandboxd[246]: ([3295]) Pages(3295) deny file-read-data /Users/Mom/Downloads/12%20angry%20men.docx
    11/12/14 12:42:39.850 PM sandboxd[246]: ([3295]) Pages(3295) deny file-read-data /Users/Mom/Downloads/12%20angry%20men.docx
    11/12/14 12:42:39.874 PM sandboxd[246]: ([3295]) Pages(3295) deny file-read-data /Users/Mom/Downloads/Quiz%20#2.docx
    11/12/14 12:42:39.945 PM sandboxd[246]: ([3295]) Pages(3295) deny file-read-data /Users/Mom/Downloads/Quiz%20#2.docx
    11/12/14 12:42:41.000 PM kernel[0]: Sandbox: storeuid(3051) deny mach-lookup com.apple.dock.server
    11/12/14 12:42:48.968 PM WindowServer[132]: WSGetSurfaceInWindow : Invalid surface 702894100 for window 1378
    11/12/14 12:42:48.968 PM WindowServer[132]: WSGetSurfaceInWindow : Invalid surface 702894100 for window 1378
    11/12/14 12:43:17.000 PM kernel[0]: Sandbox: storeuid(3051) deny mach-lookup com.apple.dock.server
    11/12/14 12:43:23.225 PM com.apple.xpc.launchd[1]: (com.apple.quicklook[3316]) Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
    11/12/14 12:43:24.355 PM WindowServer[132]: disable_update_timeout: UI updates were forcibly disabled by application "PrinterProxy" for over 1.00 seconds. Server has re-enabled them.
    11/12/14 12:43:24.946 PM WindowServer[132]: common_reenable_update: UI updates were finally reenabled by application "PrinterProxy" after 1.59 seconds (server forcibly re-enabled them after 1.00 seconds)
    11/12/14 12:43:34.503 PM mdworker[3319]: code validation failed in the process of getting signing information: Error Domain=NSOSStatusErrorDomain Code=-67062 "The operation couldn’t be completed. (OSStatus error -67062.)"
    11/12/14 12:43:34.514 PM mdworker[3320]: code validation failed in the process of getting signing information: Error Domain=NSOSStatusErrorDomain Code=-67062 "The operation couldn’t be completed. (OSStatus error -67062.)"
    11/12/14 12:43:34.604 PM mdworker[3318]: code validation failed in the process of getting signing information: Error Domain=NSOSStatusErrorDomain Code=-67062 "The operation couldn’t be completed. (OSStatus error -67062.)"
    11/12/14 12:44:38.628 PM sandboxd[246]: ([3051]) storeuid(3051) deny mach-lookup com.apple.dock.server
    11/12/14 12:44:41.384 PM locationd[63]: Location icon should now be in state 'Active'
    11/12/14 12:44:44.653 PM sandboxd[246]: ([375]) com.apple.metada(375) deny mach-lookup com.apple.cfnetwork.cfnetworkagent
    11/12/14 12:44:44.793 PM sandboxd[246]: ([375]) com.apple.metada(375) deny mach-lookup com.apple.cfnetwork.cfnetworkagent
    11/12/14 12:44:45.149 PM sandboxd[246]: ([375]) com.apple.metada(375) deny mach-lookup com.apple.cfnetwork.cfnetworkagent
    11/12/14 12:44:56.515 PM Console[3327]: Failed to connect (_consoleX) outlet from (NSApplication) to (ConsoleX): missing setter or instance variable
    11/12/14 12:44:56.641 PM locationd[63]: Location icon should now be in state 'Inactive'
    11/12/14 12:44:56.834 PM sandboxd[246]: ([3051]) storeuid(3051) deny mach-lookup com.apple.dock.server
    Not sure what any of this means.

  • Search Server Error - Illegal operation attempted on a registry key that has been marked for deletion

    Hello,
    I have a 5 server farm (DC, 2 WFEs, 1 SQL,1 CA w/ search) and am experiencing an issue when returning search results.  This issue just started occurring recently, and basically the search page throws a correlation id whenever used.  The error returned
    is:
    SearchServiceApplication::Execute--Exception: System.Runtime.InteropServices.COMException (0x800703FA): Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA)
    SearchServiceApplicationProxy::Execute--Error occured: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA) (Fault Detail
    is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.Runtime.InteropServices.COMException: Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA)
    I even attempted to create an out of the box enterprise search site with OOB masterpages and I still am receiving this error.  
    I have also tried the  ‘Do not forcefully unload the registry at user logoff’ registry edit, but it did not work.
    Has anyone ran into this issue and has another solution other than the ‘Do not forcefully unload the registry at user logoff’ registry edit?
    Thanks!

    IISReset works for me (but after some time it fails again)
    Check this posts: http://pacsharepoint.com/2011/11/sharepoint-search-illegal-operation.html
    http://blogs.msdn.com/b/distributedservices/archive/2009/11/06/a-com-server-application-may-stop-working-on-windows-server-2008.aspx
    hope it helps,

  • Database Auditing to record DELETE operation on a schema for all tables.

    Hi,
    I am using ORACLE DATABASE 11g. I want to apply the AUDIT feature to record all the DELETE operations happening on the schema tables.
    I did the following steps but dint got the proper output :-
    I logged into the SYS as sysdba user and set
    alter system set audit_trail=DB,EXTENDED scope=spfile;then i executed this command to record the sql which will use the DELETE privileges
    AUDIT DELETE ANY TABLE;Then i bounced back my DB and for testing purpose i created a table in SCOTT schema and inserted 10 rows in it and then DELETE all the rows from it.
    As per expectation i check the view
    select * from aud$
    where spare1 like '%MACHINE1%'
    and USERID='SCOTT'
    order by ntimestamp#;The output i got is :-
    34     168368     1     1          SCOTT     I-DOMAIN\MACHINE1     MACHINE1     100     0                                                                      Authenticated by: DATABASE; Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=2565))          MACHINE1                    5          21-DEC-11 07.02.58.621000 AM               0     928:5024     0000000000000000               983697018     <CLOB>     <CLOB>     But here i don't see the SQL generated in the last column.
    What i was expecting is that if i fire a DELETE statement in the schema it will get logged here and with the help of this view i will be able to see that which user from which machine executed a DELETE statement and what that statement was?
    Please let me know what step i have missed here.
    PS:- The ACTION# column shows 100 , is it the code for DELETE action. I also accessed the DBA_AUDIT_TRAIL view but din't found any usefull info their.
    Thanks in advance.

    Try instead:
    audit delete table;AUDIT DELETE ANY TABLE is auditing use of DELETE ANY TABLE privilege.

  • HT1338 get this response when trying to check for updates  The operation couldn't be completed. (NSURLErrorDomain error -1100.)

    The operation couldn’t be completed. (NSURLErrorDomain error -1100.)

    There are many people suffering from this problem right now (including me). It appears to be a server issue. Just wait and try checking for updates again tomorrow.
    Some things I have heard indicate that this may be a regional problem, though what parts of the world are affected I don't know yet. A few people have been helped by deleting the following preference file (paste the path into the Go -> Go to Folder window in the Finder to locate it), though most have not:
    ~/Library/Preferences/com.apple.SoftwareUpdate.plist
    Note that if you are trying to download iTunes 10.7, that can be found here:
    http://support.apple.com/kb/DL1576
    Also, note that there is no reason to be anxious to get it, as the only thing added in iTunes 10.7 is compatibility with iOS 6, which will not be available until the 19th, and the new iPhone, which will not be available until later as well. The new iTunes that was announced is iTunes 11, which is also not yet available.

  • Although I am logged in as an admin, I can't check for updates or update Firefox. I'm on a Mac and would rather not delete this version and just reinstall the new version bc I don't want to lose my bookmarks. Please help - thanks.

    I need to update Firefox to the latest version, but check for updates is grayed out. I am already logged in as an admin for my computer (it's a Mac), but my computer is telling me that I don't have permission to update Firefox. How can I update Firefox? I don't want to delete and reinstall because then I will lose my bookmarks.
    Thanks!

    '''I have also been having a problem I thought it was me or my computer'''as I am not really that good with my computer ,Also there are pages that I try to go to hat says pages busy or moved can not connect,but I can from explorer.

  • Mac OS X 10.6.8, receiving error message "Failed to check for updates. The operation couldn't be completed. Operation not permitted." How to fix?

    When I try to update my software, I'm receiving the error message "Failed to check for updates. The operation couldn't be completed. Operation not permitted."
    I'm using Safari 4.0.3. Yes, I know this is an old version of Safari - I can't update it, or any other software on my MacBook. Should I just wait for the Lion OS, or is there any kind of fix a non-technical Mac user like me can attempt without screwing up her laptop?
    I've tried clearing my cache and resetting Safari already - doesn't help. I've also tried to update after disabling my (Norton) antivirus software, thinking that might be interfering. None of these help.
    I don't know if it's a related problem, but also I can't download .pdf files from the internet, although I used to be able to.

    You should use the NortonAV uninstaller to uninstall it. Disabling the dreadful thing in the past hasn't always been sufficient for it to cease creating system havoc. The Mac NortonAV version has a long and well-earned reputation for doing truly seriously nasty things to OS X. Shame on Comcast for inflicting NortonAV on its Mac customers. It's not a matter of if NortonAV will mess up OS X but when and how badly. I can't help but wondering if some setting in your Norton AV has decided that NortonAV, rather than you, will be making executive decisions about what you are allowed to install on your computer and is keeping that fact a secret.
    After you are done uninstalling Norton use the finder to search for any Norton files that the uninstaller might have missed. Add the option to search for invisible files.
    After you have removed all the Norton bits and pieces restart in safe mode by holding down the shift key right after the startup chime. Keep holding down the shift key until you see the Apple logo and spinning gear. Safe mode does some maintenance tasks which means a much longer than normal startup time. Use Disk Utility to repair permission
    If your Mac works normally in safe mode restart. If things still aren't fixed you might want to give another shot at reinstalling Snow Leopard from the install DVD and applying the Mac OS X 10.6.8 Update Combo before taking your Mac to the Apple Store.
    If you feel the need to run AV software on your Mac use ClamXav in manual mode. It's donationware and doesn't seem to cause the litany of weird problems that are associated with other AV software.

  • HT201232 My operating system is Mac OS X 10.6.8 and when I'm surfing the web, it tells me I need to update my browser however when I check for updates, nothing comes up. What do I need to do to get Mac OS X Lion v10.7?

    My operating system is Mac OS X 10.6.8 and when I'm surfing the web, it tells me I need to update my browser however when I check for updates, nothing comes up. What do I need to do to get Mac OS X Lion v10.7?

    Software update will only bring you up to the current level of the system you are using - you are at the maximum for Snow Leopard. To get Lion or higher you will have to go to the Mac App Store in Applications and purchase it there (Yosemite is free). You will need to check that your Mac meets the requirements and you should particularly note that PPC programs such as AppleWorks will not run in Lion or above.
    The requirements for Lion are:
    Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor
    2GB of memory
    OS X v10.6.6 or later (v10.6.8 recommended)
    7GB of available space
    Lion is available in the Online Apple Store ($19.99). Mountain Lion (10.8.x) is also available there at the same price (though it's reported to have been removed from sale in some countries so may well cease to be available generally) but there seems little point as the system requirements are the same for Yosemite (10.10.x) - which is free - unless you need to run specific software which will run on Mountain Lion only.
    The requirements for Mountain Lion and Yosemite are:
    OS X v10.6.8 or later
    2GB of memory
    8GB of available space
      and the supported models are:
    iMac (Mid 2007 or newer)
    MacBook (Late 2008 Aluminum, or Early 2009 or newer)
    MacBook Pro (Mid/Late 2007 or newer)
    Xserve (Early 2009)
    MacBook Air (Late 2008 or newer)
    Mac mini (Early 2009 or newer)
    Mac Pro (Early 2008 or newer)
    Yosemite is available from the Mac App Store (in Applications). Mountain Lion can be obtained the Online Apple Store. (Mavericks is no longer available.)
    If the problem is only with Safari and you are otherwise happy with Snow Leopard you could switch to FireFox (free) - the latest version of that will run in Snow Leopard.

  • I have clicked the Apple  Software Update,a window pops up with Failed to check for updates.The operation couldn t be completed. Operation not permitted.This only occurring now did not happen previously.I am using 10.7.4,on a Mbp Pro.

    I have clicked the Apple > Software Update,a window pops up with >Failed to check for updates.
    The operation could not completed. >Operation not permitted. This is only occuring now.It did not happen
    before.The Apple store in Sydney NSW Australia only reinstalled 10.7.4 Lion yesterday.I have downloaded my
    Itunes song and reinstalled Intego antivirus.Will somebody please advise me what to do.It is 4:03 PM Saturday
    here in Koolewong.
                        richard.

    Uninstall Intego...you don't need it.

  • Why won't my iMac print consistantly to my compatible HP 6500A? I've checked for updates and downloaded the lasted software...still can't print. All my other Mac devices find the printer but the iMac is hit and miss. I'm operating the Mac OS X Lion 10.7.

    Why won't my iMac print consistantly to my compatible HP 6500A? I've checked for updates and downloaded the lasted software...still can't print. All my other Mac devices find the printer but the iMac is hit and miss. I'm operating the Mac OS X Lion 10.7.

    When you say hit and miss do you mean sometimes you print a whole document with no problems, or do you mean each document has problems? This is from HP's website for your printer:
    Your sig says 10.6.7 but your message says 10.7. So if it's really Lion, this printer isn't officially supported. Elsewhere on HP's site it says updated drivers will be available on your Mac via Software Update. Have you run that recently?

  • Setting deletion indicator/Flag for an operation in production order

    Dear All, Hi
                     How to set deletion indicator/flag for an operation in a production order. I don't want to delete the operation as such. Please help & suggest.
    Ragards,
    Shaiz

    Hi Shaiz,
    I hope the requirement is just like you posted earlier as in case of component deletion.
    Here in this case also the behaviour of the order remains the same.
    So you can go for release the order as soon as the order gets created, your both the requirements can be fullfilled.
    Also you havn't provided the exact feedback on the solutions offered by all of us, on your last query.
    Request you to give detailed input on the same.
    Hope thish helps you.
    SmanS

Maybe you are looking for

  • Red circles with red squares inside?

    I have red circles with red squares inside, prohibiting me from playing some of my music, playlists etc. ???

  • Showing special character in Dos Mode while doing Alt+255 in ALV for spaces

    Hi, I have used alt+255 in my code to show space at the end of alv's one of the column. I had used alt+255 because the space ' ' was not displayed in the alv. When i copy the text of the alv to a notepad file i was able to display the space at the en

  • Home sharing - album artwork repeating

    I am home sharing to play music in my itunes library through my iphone 4S, although i notice when scrolling through the albums, every 10 albums the album artwork repeats itself thus showing the completely wrong artwork for the majority of albums.  Wh

  • Execute process chain step based on value in a custom table

    HI, I have a requirement where i need to execute a process chain step based in the value of a field in a custom table. e.g. If ztable-zflag = 'X' then execute next step else stop. I am trying to use the decision between multiple alternatives process

  • Serial Numbers in QA11 Record Usage Decision

    Hi all, We are using the serial numbers scenario in goods receipt. The user has to enter the serial numbers of the equipment/devices at the time of preparing goods receipt in MIGO_GR against a purchase order. An Inspection Lot is generated after post