Does the sequence of Insert/Update matter?

Dear friends
I wanted to know whether there is any difference in results if I change the sequence of Insert/Update statements. For example, if I'm inserting / updating records in a table, normally I write my code as below
<code>
Begin
Insert Into Table Name(...)
Values(...);
Exception
When Dup_Val_On_Index Then
Update Table Name Set
Column_Name = Value;
When Others Then
Sqlerrm;
End;
</code>
Lets assume, if I change the order of statements as below:
<code>
Begin
Update Table Name Set
Column_Name = Value;
If Sql%NotFound Then
Begin
Insert Into Table Name(...)
Values(...);
End;
Exception
When Others Then
Sqlerrm;
End;
</code>
So does this change make any difference in net results?

Yes...till before today morning, it had no difference to me too, but today I was facing an insertion problem in a procedure in which insert statement had to go into when_dup_val exception part after first record and execute update statement. But surprisingly, it was going into when_dup_val only for 2nd record, i.e. 1st record was inserted as new record, then 2nd record had same primary key values, so when_dup_val caused to execute update statement, and lastly for 3rd record, having same primary key values, instead of executing update statement, insertion was going into when_others exception part and raising error ORA-01008.
After very detailed hit n trial, I just reversed the operations, took udpate statement before insert in my code and then all the things got right. Procedure is executing finely.
Although I've resolved the issue but I couldn't digest this change, thats why asking you peeps the operations behind.

Similar Messages

  • HT1689 since doing the 7.0.4 update i notice that my mobile data has doubled and i am running out of data mid month.  I've disabled apps s not many running.  Any suggestions?

    since doing the 7.0.4 update i notice that my mobile data has doubled and i am running out of data mid month.  I've disabled apps s not many running.  Any suggestions?

    I am having the same issue even with the newer 7.1. I have a 1-100 KB data push on both my husdand's and my phone every hour on the hour (i.e. my will be at :23 of the hour and his will be at :13 of the hour and it will change). This is whether we are on a WIFI and with all apps, background refreshes, push notifications, etc turned OFF.

  • Does the 10.0.2 update work?

    Does the 10.0.2 update work?
    I tried the update to 10.0.2 when it was released but the update failed to work.
    Adobe Application Manager gave the following dialogue:
    "Some updates failed to install. Update is not applicable".
    Apple's Get Info for the application says version 1.0.1 and the Adobe about box says version 10.0.1.19
    I ran "updates" from the After Effects help menu again this morning but the response is "no updates available"
    I have the retail copy of CS5 and used the retail version of the update.
    Pip

    Someone's going to say it, so it may as well be me...
    This is a user-to-user group, not an official Adobe technical support outlet.  It is my understanding that Adobe people such as Todd contribute as part of an unofficial help policy, and we all appreciate the input.
    So sorry if you think these very useful fora are shoddy and didn't meet your expectations!

  • Does the 10.5.7 update address command+f finder search issues?

    Does the 10.5.7 update address command+f finder search issues?
    Search has been horrible under 10.5 in that it does not reliably find FOLDERS on network drives, only file names.
    Even when I am looking directly at a folder and I search for it will not appear in the command+f window.
    Also the stupidity of not allowing a specific search location.
    Has this been addressed? I have, at any given time, 3-4 mounted servers.
    I do not have a choice now to search a specific hard drive.
    10.4.11 gave me the option under "OTHERS" to select a specific place to search.
    The only choice I have in 10.5.2 is "SHARED". Which searches all drives when I only want to search one. Nor do I have a choice of searching just one of my two internal drives.
    I talked with Chris in apple engineering several months ago, who acknowledged that search problems are a known issue under 10.5 and this was being addressed but have not heard any more. I don't want to download an update unless these broken search issues have been fixed. This is a production machine and I cannot have downtime in the Dept.

    Have you filed a bug report or enhancement request with Apple?
    http://bugreport.apple.com/

  • How does the MDKP table gets updates

    Dear PP Guru's,
    I am new to SAP PP,
    We have a query that how does the MDKP table gets updates,
    Some time If we create new material by coping the material which is showing in table MDKP,
    But new material is not showing in table MDKP,
    Based on table MDKP we are fetching some data, due to above problem we are not able to fetch the data for some materials,
    Please suggest what could be the reason,
    Any help will be highly appreciated,
    Thanks in advance,
    Sachin.

    Thanks Thaila,
    I have checked the same by doing MRP through MD02 & the entry is getting update in MDKP,
    But for some of our materials MRP (MD02) is done earlier, but these materials are not showing in MDKP,
    Please suggest, when the entries in MDKP are removed, are there any conditions for removing the entries from MDKP.
    please pour some light on the issue,
    Thanks once again,
    Sachin.

  • HT6114 Does the 10.9.2 update fix the issue on 2011 macs where projectors with HDMI are not recognized via thunderbolt adapter?

    Hi Mac,
    Does the 10.9.2 update fix the issue on 2011 macs where projectors with HDMI are not recognized via thunderbolt adapter?
    Thanks in advance,
    Ricardo Arguelles

    Sordidloam wrote:
    So to be clear, this issue occurs on any input with the Denon Receiver.  Occurs from both HDMI out and MiniDisplay Port out.  Goes away when we reinstall the OS and update it to 10.9.2.  Comes back as soon as we update to 10.9.3.
    Cheers
    MLE
    Have you been able to use the Mac Mini directly attached to the plasma/LCD/projector with out going through the Denon AVR? Even with 10.9.3 installed?
    I have a Pioneer AVR and I have the Mac attached via a HDMI to HDMI and all is working for me. Can your Denon do some upscaling? Some AVR, like my VSX-53 can change the scaling of the input video. Meaning if I still had my Apple TV 2 which outputs 720P only, can be upscaled in my AVR to 1080i or 1080P or even 24fps. Heck, I could even plug in an old style Red, White, Yellow cable and upscale it to 1080P and output it HDMI.
    I am wondering if your Denon is able to do that and it might be set wrong. Check the owners manual for such settings. Even the plasma/LCD/project could be doing the upscaling too. So check that too.
    KOT

  • I run 3 email accounts on Mac Mail, all 3 disappeared after doing the latest OS X update. I have tried adding the accounts back but no mail appears. Help!

    I run 3 email accounts on Mac Mail, all 3 disappeared after doing the latest OS X update. I have tried adding the accounts back but no mail appears. Help!

    The mailbox list is divided into categories with headings in caps, such as ON MY MAC. When you hover the cursor over one of those headings (except for MAILBOXES), you should see the word Show or Hide on the right. Click Show. The  MAILBOXES category can't be hidden.
    In each category, the mailboxes are arranged in groups, such as Inbox. To the left of each group is a small disclosure triangle. If the triangle points to the right, click it so that it points down.

  • HT201210 How can i stop loosing all my videos, music, pics etc after an IOS update? PLEASE can somebody help me as i've lost everthing the last time i proceeded with this update so this time my mam thought she was doing the right thing by updating my phon

    How can i stop loosing all my videos, music, pics etc after an IOS update? PLEASE can somebody help me as i've lost everthing the last time i proceeded with this update so this time my mam thought she was doing the right thing by updating my phone!! :C

    everything should be on your computer.
    If you do as you should and make sure that everything is on your computer, then you should lose nothing.

  • What Does The Log Message "Rejecting update: Lease..." Mean?

    I use RelicatedCache and TransactionMap on Coherence 3.4.2.
    I saw "Rejecting update: Lease..." message.
    What does the log message mean?
    2011/10/18 06:41:57.506 [DEBUG] Logger@9263394 3.4.2/411p16 N/A NOAH Coherence 3.4.2/411p16 [D4] (thread=ReplicatedCache, member=2): Rejecting update: Lease: [-8863526970089418959, -2793231267399579492, R] (Cache=issue-code, Size=Unknown, Version=0/0, IssuerId=1, HolderId=0, Status=LEASE_AVAILABLE, Last locked at Thu Jan 01 09:00:00 JST 1970)
    by member=2, Lease: [-8863526970089418959, -2793231267399579492, R] (Cache=issue-code, Size=143, Version=0/0, IssuerId=2, HolderId=0, Status=LEASE_AVAILABLE, Last locked at Tue Oct 18 06:41:51 JST 2011)
    I found a Note 1065352.1, but the message is little differnt...
    Note 1065352.1
    "What Does The Log Message "Rejected update: Lease..." Mean?"I'd like to know following 2 points..
    - What does "Rejecting update: Lease..." message mean?
    Do thsese messages have same meaning?
    - My application didn't catch any exceptions, and
    "CacheFactory.commitTransactionCollection" returned true.
    So this "Rejecting update: Lease..." is not a error message, right?
    (Does the transaction commited successfully?)
    Thanks in advance.
    -Noriyuki

    Hi
    These are decoded results of the error message which u have recd in ur box..
    %C4K_PKTPROCESSING-4-ERRORPACKET: [char]
    The software is unable to process a packet; the packets have been forwarded to the CPU instead and the packet will be dropped.
    Recommended Action: This is an informational message only. No action is required.
    %C4K_HWACLMAN-4-WARNINGSTRING: [char]
    A nonspecific warning message was displayed.
    Recommended Action: See the message string [char] for more information.
    Related documents- No specific documents apply to this error message
    %C4K_HWACLMAN-4-WARNINGSTRING: [char]
    A nonspecific warning message was displayed.
    Recommended Action: See the message string [char] for more information.
    Related documents- No specific documents apply to this error message.
    regds

  • TA22800 How long does the 10.8.3 update take?

    How long does the 10.8.3 update take?

    It depends on your Internet speed. I have about 5MBPS and it took me 8hrs. If you have hi-speed internet I would say it would take about a hour.
    Hope This Helps!
    Mini Apple Genuis

  • Receiver JDBC: Error while doing the Deleting and Inserting new records

    Hi All,
              I am doing Idoc to JDBC scenario. In this I am collecting & bundling different type of Idocs and then sending to the JDBC receiver. My requirement is to delete the existing records in the database and insert the new records. I have configures as mentioned in the link
    Re: Combining DELETE and INSERT statements in JDBC receiver
    In the above link its shows for single mapping. In my scenario I am using multi mapping for collecting idocs in BPM. If I configured for normal mapping then it is working fine(Deleting existing records and Inserting new record). Whenever I am using multi mapping then I am getting following error in the receiver JDBC communication channel u201CError while parsing or executing XML-SQL document: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)u201D . Can you please tell me what might be the problem.
    Thanks & Regards,
    T.Purushotham

    Hi !
    check this out:
    JDBC - No 'action' attribute found in XML document - error
    JDBC receiver adapter: No 'action' attribute found in XML document
    It appears that the inbound payload (the one that is going from XI to the JDBC adapter) does not have the requiered tag to specify which SQL action to execute in the receiver system. Maybe the multimapping is not creating the desired output message format.
    Regards,
    Matias.

  • HT4623 I am doing the IOS 7.02 update to address security. THe IPAD is now asking me to plug in to ITunes. When I do this, my MAC is saying that the IPAD is in recovery mode and my data will be lost.  What happened?!!

    I was doing the IOS 7.0.2 update to address security. The IPad is now telling me to plug in to Itunes. When I do so, my MAC is saying the IPad is in recovery mode and my data will be lost. What happened?!!  How do i fix?

    Something went wrong with the update and you are in Recovery Mode.
    Follow the instructions below to recover your iPad.
    http://support.apple.com/kb/ht4097

  • HT4623 Does the 7.1.1 update delete my messages including Imessage?

    I would like to keep all my messages ecspecially the imessages from my family.  Does the new update delete them?  If so is there a way to download them first and retreive them later?
    Thanks for the help.

    Do you not backup your phone to either itunes or icloud? 
    Those data you mention is part of the backup.
    You should be backing up on a regular basis.
    so backup your phone and then do the upgrade.
    I've never lost anything due to upgrading the IOS on my phone.

  • Why does the new OS X update cause Safari to freeze when adding a bookmark?

    Just installed the latest OS X update and now every time I attempt to add a bookmark Safari freezes (Not Responding) and the color wheel just spins and spins until I force the program closed. OS X 10.9.5 / MacMini

    Try installing OS X Mavericks 10.9.5 combo update.
    http://support.apple.com/kb/DL1760?viewlocale=en_US&locale=en_US

  • When does the iTunes store usually update its libraries with new content in the US, specifically TV shows?

    Hello Apple community. I was wondering if anyone would be able to tell me approximately when the iTunes Store usually updates its content. I have a couple TV shows I'm watching. I noticed that new episodes of The Amazing World of Gumball and The Looney Tunes Show tend to update with the newest episode the day after it airs. Gumball is usually updated on Tuesdays, sometimes every other Tuesday, but the new episode isn't available on the store yet. It's possible that a holiday threw the scheduled update times off. Still, I would like to know approximately when the iTunes Store updates. I like to plan things out so I know when to purchase gift cards. Thanks Apple community.

    The facility to ping the Store, to draw attention to a change in your podcast, has been removed: the Store will check your feed and update - usually this takes 1-2 days. I was never convinced that pinging made any difference anyway.

Maybe you are looking for

  • Reports 3.0.5.8.0 bug?

    I've noticed that if you put Conditional Formatting on a field in the layout model, then remove that formatting... Oracle retains the old function somewhere. Although I can't find it using the Report Builder tools, if I do a File --> Administration -

  • How to multiply the sum of a column times a £0.20

    Sorry but i am new to mac and numbers, i cant seame to make this work in numbers (works fine in excel) what i need is: i need to sum column B times (i.e. £0.20. i am sure this is very simple but for the life in me i cant get this to work. Thanks for

  • SSl error accessing internet banking

    I can no longer access internet banking! Get SSl error

  • MultiTrack mono to Stereo mixdown

    Sorry if this has been posted before. I searched and did not see it. I typically record to multitrack anywhere from 4 to 10 tracks in mono. I then mixdown to stereo using the mixer. When I output the individual channels to Master and pan the individu

  • Never made web site,Not subscribed to MobileMe, where can  publish for free

    I want to start off making a website, a basic one, as its my 1st about a hobby. I was going to use a free online web based one, but thought I have iMac and iLife 08, so why not try iWeb I know its tied into MobileMe, but is there a way to post the si