How to count updated rows after an UPDATE?

Is there a way to count updated rows after an update?
Let's say I have an update like
UPDATE table_a
set field_1 = 'new_field'
WHERE field_2 ='some_value' ;
And now I would like to insert an info record into logging table like
INSERT INTO logging_tbl (step, description, changed_rows) VALUES('UPDATE', 'update of table_a', ?);
update is in sqlplus script.
Thanks.
Message was edited by:
br00klynZ00

Use SQL%ROWCOUNT.
DECLARE
  v_num NUMBER := 0;
BEGIN
UPDATE table_a
set field_1 = 'new_field'
WHERE field_2 ='some_value' ;
v_num := SQL%ROWCOUNT;
INSERT INTO logging_tbl (step, description, changed_rows)
VALUES('UPDATE', 'update of table_a', v_num);
END;

Similar Messages

  • Count of updated rows after an UPDATE command

    Hi, is there any way to know how many rows have been updated after an UPDATE statement in a PL/SQL program (i know it is possible in Pro*C. Thanks.

    Hi,
    it will be stored in sql%rowcount
    after your update statement try to assign this to a variable
    Update table set ....
    v_count := sql%rowcount;
    check the value of the variable v_count
    Thanks
    Ravi

  • How do I verify iCloud after I updated already?

    How do I verify iCloud after I updated to software 5.0? A message about account settings keeps coming up, although setting are fine

    You should have received an email which you can follow for verification. if you haven't received one, Start here, change your country if necessary and go to manage your account. Ask for a new email to be sent to you.

  • Todays update! After todays update I can no longer send Safari or Spotify to the task bar without it cutting out (dropping audio in and out). Streams normally if I keep the window open on my desktop. This needs to be fixed immediately.

    Todays update! After todays update I can no longer send Safari or Spotify to the task bar without it cutting out (dropping audio in and out). Streams normally if I keep the window open on my desktop. This needs to be fixed immediately.

    Nevermind. I figured it out.

  • Can not update apps after IOS8 update on iPhone 4s

    Can not update apps after IOS8 update on iPhone 4s
    I can no longer update apps on my iPhone 4s after the IOS 8 update. The IOS 8 update took a very long time to complete, maybe 12 hours, and afterwards, it worked but updating packages were very slow. Package updates have since been problematic and about 4 days ago, it stopped being able to update any packages. I click on them to update and they never make any progress. I have 2.8 Gbytes free and I keep deleting more and more packages, pictures, etc. It seems like, from the amount of stuff that I have deleted, I should have more than 2.8 Gbytes free.
    Is anyone else having this kind of problem?

    16GB iPhone4: Go to Settings, scroll down to iTunes & App Stores and touch. At the top of the next page it shows: Apple ID. Touch this. Select Sign Out. Your Apple ID will go away. Re-enter Apple ID and password. Try App Store again.
       Other solutions were to go to Settings:General:Date&Time and turn off auto-update, then change date to next year. This didn't work for me, nor a lot of other users on the forums. It took reading a lot of threads to find the log-out, log-in solution. Even on the official Apple Website all I saw was: Make sure your connection is working, battery is charged, desktop is plugged in when you try to sync. OK I exaggerate, but with all the users posting this problem, you'd think they'd post their solutions when they work with a Tech Help call.

  • Trying got update iPhoto after OS update - This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled.???

    Trying got update iPhoto after OS update - This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled.

    With Yosemite you need to update to iPhoto 9.6.
    The error message means, that iPhoto has not been associated with your AppleID. You do not say, which iPhoto version you are trying to update from.
    Associating iPhoto with your AppleID should have happened, when you bought the computer with iPhoto preinstalled with MacOS X Lion or later or with the Mavericks upgrade, if your Mac came with SnowLeopard. Try, if you can "accept" iPhoto now:
    Sign into the AppStore with your AppleID
    Open the "Purchased" tab. Do you see iPhoto with an "Accept" button?
    Accepting associates your Apple ID with the preinstalled iPhoto. It should move iPhoto from the "Accept" portion of the App Store to the "Purchased" tab. After that, you should be able to update iPhoto from the Updates tab of the AppStore. If you do you not see the update there, try to buy iPhoto. iPhoto may show for free, so you do not have to pay again.
    Backup your iPhoto library, if you do not have a current backup.
    Uninstall iPhoto by deleting it from the Applications folder, otherwise you cannot buy it again. But do not empty the Trash, so you can put iPhoto back, if need be.
    Launch the App Store, click the "Store" menu, and sign in with your current AppleID.
    Open the main page "Featured" of the App Store and search for iPhoto.
    If iPhoto is listed as "Free", click the "Free" button to buy it with your current AppleID.
    If it is not showing as free, there is no help but contacting the App Store Support to sort out the AppleID. Use this link: http://www.apple.com/support/mac/app-store/contact/
    After you update iPhoto, your iPhoto Library will need upgrading. Make a backup of your iPhoto Library, before you open iPhoto the first time after updating.

  • When I went to open creative cloud, it said it needed an update, but after I updated it now can not get it to open up

    When I went to open creative cloud, it said it needed an update, but after I updated it now can not get it to open up

    what do you see when you try to open it?

  • How to close my app after last update

    I can't close my app with normal way after last update
    Need help for this
    Thx

    You still double-click the home button to open the multitasking bar, but you now drag or swipe the app 'screens' up from there and off the top of the screen :

  • HT5624 how to open disabled ipad after installing update

    help me to open or wipe clean my ipad which was disabled after system update in which the computer says i entered 4 digit pin of which i did not enter
    i tried itunes but it cant connect due to it being disabled.  is there a phone number i can call.

    Hello there, rickh.
    The following Knowledge Base article provides the assistance you are looking for:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    In the future, if you'd like to contact Apple directly a great place to start is:
    Apple - Support - Product Selection
    getsupport.apple.com
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • How to turn off alarm after system update?

    I get alarm when restarting my T400 after system update. Can anyone give me suggestions to turn off this alarm?
    Thanks,

    I have no display > powercontrol in openbox, gnome or fluxbox, What are you talking about?

  • How to restore safari bookmarks after osi update

    how to restore safari bookmarks after ios. update

    The only way is to restore from a useful backup, if you have one.
    If you sync the iPad to iTunes and use Time Machine regularly, you would likely have the appropriate backup to restore from. In that case:
    Restore the iPad backup set from Time Machine from a date before you overwrote the bookmarks. The location of the backup is ~/Library/Application Support/MobileSync/Backup/ (you can get to it by pressing Cmd+Shift+G in the Finder and entering this path).
    Connect the iPad, run iTunes and restore from the backup.
    If you use iCloud Backup, then you can restore from iCloud and choose which date's backup you'd like to restore from. You can check if you're using iCloud Backup by opening the Settings app on the iPad, then going to the iCloud submenu and looking at the status right below "Storage & Backup", where it would say "iCloud Backup is off." (or "iCloud Backup is on.", as the case may be).
    In any case, keep in mind that restoring from a backup means you lose all application data changes after the date of the backup.
    Also see Restoring from a previous iCloud backup.

  • [SOLVED] Problems with systemd-update-utmp after systemd update

    Hi all,
    I noticed that systemd-update-utmp-runlevel.service has been failing since the last systemd update. My systemd is:
    Repository : core
    Name : systemd
    Version : 184-2
    $ systemctl status systemd-update-utmp-runlevel.service
    systemd-update-utmp-runlevel.service - Update UTMP about System Runlevel Changes
    Loaded: loaded (/usr/lib/systemd/system/systemd-update-utmp-runlevel.service; static)
    Active: failed (Result: exit-code) since Sat, 02 Jun 2012 13:55:40 +0200; 56min ago
    Docs: man:utmp(5)
    Main PID: 395 (code=exited, status=1/FAILURE)
    CGroup: name=systemd:/system/systemd-update-utmp-runlevel.service
    The exact cause of error is:
    Jun 02 13:55:40 arch systemd-update-utmp[395]: Failed to write utmp record: No such file or directory
    Jun 02 13:55:40 arch systemd[1]: systemd-update-utmp-runlevel.service: main process exited, code=exited, status=1
    What's more, after this update I am not able to mount vmware hgfs shares. I've got following entry in my /etc/fstab (from arch's wiki)
    #enable shared folders
    .host:/ /mnt/hgfs vmhgfs defaults,ttl=5 0 0
    It worked just fine. After the update system boots into maintenance mode with the following message found in sysemd-journal:
    arch mount[143]: Directory in share name must not be empty
    arch mount[143]: Error: share name is invalid, aborting mount
    After commenting hgfs mount entry out the system boots normally.
    Thanks in advance.
    EDIT:
    Mounting hgfs shares manually works as expected
    $: sudo mount /mnt/hgfs
    Could not add entry to mtab, continuing
    mtab:
    .host:/ /mnt/hgfs vmhgfs rw,relatime 0 0
    so this issue must be systemd related
    Last edited by mrzeznicki (2012-06-07 15:18:05)

    falconindy wrote:Still can't reproduce this. libmount's parser does just fine with ".host" as a dummy entry in my /etc/hosts file mapped for an NFS share.
    Yep, libmount is probably not a problem, I guess this error comes from vmware's hgfsmounter
    static Bool
    ParseShareName(const char *shareName, // IN: Share name to validate
    const char **shareNameHost, // OUT: Share name, host component
    const char **shareNameDir) // OUT: Share name, dir component
    const char *colon, *dir;
    /* 1) Must be colon separated into host and dir. */
    colon = strchr(shareName, ':');
    if (colon == NULL) {
    printf("Share name must be in host:dir format\n");
    return FALSE;
    /* 2) Dir must not be empty. */
    dir = colon + 1;
    if (*dir == '\0') {
    printf("Directory in share name must not be empty\n");
    return FALSE;
    /* 3) Dir must start with forward slash. */
    if (*dir != '/') {
    printf("Directory in share name must be an absolute path\n");
    return FALSE;
    /* 4) Host must be ".host". */
    if (strncmp(shareName, ".host:", 6) != 0) {
    printf("Host in share name must be \".host\"\n");
    return FALSE;
    *shareNameHost = ".host";
    LOG("Host component of share name is \"%s\"\n", *shareNameHost);
    *shareNameDir = dir;
    LOG("Directory component of share name is \"%s\"\n", *shareNameDir);
    return TRUE;
    I am just wondering why it worked before (and why manual mount works). Is there anything in systemd mount layer that consumes '/'?

  • Software Update crashes after first update install after 35 pass Format.

    Ok so I have a powerbook G4 1.67 and a G5 1.5. Both have been acting weird so I reformatted and installed tiger on both. The powerbook has its own install disk and the Desktop I use the store bought version of Tiger. I did a zero all data on the Powerbook and a 35 Pass Format on the desktop. Immediately after installing the first set of Software updates both systems independently and at different times wont accept updates. Software update crashes after showing what updates are available. If I uncheck 10.4.10 on the first update and then try to manually install 10.4.3 after the first software update and restart it goes to the second installation window and freezes. There has to be a bad update in Itunes or something. Does anyone know what Is going on? I am getting really bad conspiracy vibes about this considering were a week away from a new release.

    If you haven't installed any third party software,
    and are using a version of Tiger that is known to work on that Mac (system specific disks from other Macs do not work all the time),
    then it sounds like you have a hardware issue with your machine which installing a new operating system won't help. An erase and install should eliminate bad preferences, bad cache, bad drivers, corrupt files, as long as nothing third party is attached the machine other than a display.
    Third party keyboards, mice, and other peripherals can all contribute to problems. Displays won't contribute unless they are underpowered in their USB or Firewire ports for the peripherals attached through them (if they are Apple displays with USB and Firewire).

  • Unable to download or update apps after ios7 update

    just downloaded ios7 software update and i can no longer install new apps or updates - when i press update it will either immiediately stop and go back to the update button, other times the circle will go round a bit then ask for me to sign in but then after that will stop again.
    Is anyone else experiencing this?
    My phone is the iPhone 4

    just downloaded ios7 software update and i can no longer install new apps or updates - when i press update it will either immiediately stop and go back to the update button, other times the circle will go round a bit then ask for me to sign in but then after that will stop again.
    Is anyone else experiencing this?
    My phone is the iPhone 4

  • Having trouble updating Adobe after lion update

    Cannot update adobe after mountain lion update

    By Adobe, do you mean Flash Player?
    You can check here what version of Flash player you actually have installed:  http://kb2.adobe.com/cps/155/tn_15507.html
    You can check here:  http://www.adobe.com/products/flash/about/  to see which version you should install for your Mac and OS.
    You should first uninstall any previous version of Flash Player, using the uninstaller from here (make sure you use the correct one!):
    http://kb2.adobe.com/cps/909/cpsid_90906.html
    and also that you follow the instructions closely, such as closing ALL applications first before installing. You must also carry out a permission repair after installing anything from Adobe.

Maybe you are looking for

  • Syncing iPhone 4S to a an iTunes library that doesn't have my nonpurchased on it

    Hi. My computer that had my iTunes on it died, so I downloaded iTunes on to my laptop. The new iTunes on my PC Windows 7 laptop  has all of my purchased songs on it through my iTunes Store account . Will I be able to sync my phone to my laptop withou

  • Writing an ALSA Renderer for Linux

    Hi, I want to write an ALSA Renderer for Linux because I have problems with the JavaSoundRenderer in Linux and I really need a fast Audio Renderer for my app. What I need is a short tutorial for ALSA that shows how I can play sound with it. If you kn

  • Quicksilver 2002/ Elegato eyeTV diversity

    Will a dual 1Ghz Quicksilver 2002 with 1Gb SDRAM,80Gb HD,running OSX 10.4 be able to use the Elegato EyeTV diversity 2008? It does have a PCI hispeed USB card (I assume therefore USB 2.0?) but I do get error messages about a USB hub drawing too much

  • DVD Player Hangs

    Since Leopard upgrade a DVD that plays fine on a regular player will not play on iMac. It plays for a while then hangs while a message says "skipping over damaged area". Had to power off to get out of DVD Player. Coould not get to force quit.

  • Error in Fiscal year close for assets

    Hi All, I did AR29 / ABAWN (revaluation of Assets). But SAP gave me error as Diagnosis The fiscal year 2001 is already closed for area 90 in company code 1000. Procedure Check the depreciation area specifications in Customizing.  If the specification