How can i perform an update instead of a Delete?

I have to migrate an MS SQL 2005 database to an ORACLE 9i database. In MS SQL we use “INSTEAD OF DELETE” triggers on tables to prevent record deletion. Instead of a delete we perform an update. Changing the application code is not an option.
According to the ORACLE documentation instead of triggers can only be applied to views.
I tried using a simple BEFORE DELETE trigger to raise an application error to prevent the deletion, but the application cannot handle the exception raised. And even if the application could handle the raised exception. I would still have to perform a update.
Question: What is the equivalent for an instead of delete trigger on a table in ORACLE 9i? (Specific do an update instead of delete) Any examples?
Message was edited by:
user640306

Question: What is the equivalent for an instead of
delete trigger on a table in ORACLE 9i? There isn't.
Changing the application code is not an option. Ahhhh I like these questions. I need to drive BMW instead of Opel but every switch has to be in the same place. Or I need to put Opel headlights into Ferrari, why I cannot do that?
Even if you could they would look ugly and most probably won't work. The first requirement for porting apps into different DBMS is to understand the fact - they are different just like cars. They are produced by different vendors just like cars.
Gints Plivna
http://www.gplivna.eu

Similar Messages

  • HT204053 I am not able to update my apps because every time I am doing this, it is asking for a password which I have never used and the person who used it is in no more contact. how can i get my id instead of his??

    I am not able to update my apps because every time I am doing this, it is asking for a password which I have never used and the person who used it is in no more contact. how can i get my id instead of his??

    Apps can only be updated using the same Apple ID and password they were originally purchased with.

  • I can not perform software updates or download any programs. They appear in the download box as images that are not recognized. How can I fix this?

    I can not perform software updates or download any programs. They appear in the download box as images that are "not recognized". I thought maybe my antivirus software was setting up a firewall, but I have disabled it, so that's not the case. Any suggestions as to  how I can fix this?

    If the downloads are gone, it's possible that Windows is removing the downloads based on security policies set in IE. I realize that sounds strange, but it's related to Firefox's feature of submitting downloads to your virus scanner and marking them as having come from the internet.
    To test this theory, you could try disabling the scan feature. I assume you have good "real time" antivirus protection which checks every file saved to your hard drive. (If not, you really should get that, and you can use Microsoft's free [http://windows.microsoft.com/en-US/windows/products/security-essentials Microsoft Security Essentials] for now until you have time to review all the available choices.)
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the filter box, type or paste '''scan''' and pause while the list is filtered
    (3) Double-click '''browser.download.manager.scanWhenDone''' to toggle its value.
    Firefox now should ignore Windows' download security. Does it change how Windows handles the file?

  • How can I rewrite this update stmt to improve its poor performance?

    Hi,
    I have the following update stmt that runs for over 6 hours. Here is the SQL and its plan:
                UPDATE TABLE1
                     SET mainveh = 'Y'
                 WHERE (comp#,polnum,a8dtef,a8deef,a8dtac,
                        DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
                    IN (SELECT comp#,polnum,a8dtef,a8deef,a8dtac,
                               MAX(DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
                          FROM TABLE1
                         GROUP BY comp#,polnum,a8dtef,a8deef,a8dtac);
    PLAN_TABLE_OUTPUT
    | Id  | Operation             | Name     | Rows  | Bytes |TempSpc| Cost (%CPU)|
    |   0 | UPDATE STATEMENT      |          |     1 |   108 |       |   798K  (1)|
    |   1 |  UPDATE               | TABLE1   |       |       |       |            |
    |   2 |   HASH JOIN           |          |     1 |   108 |  1079M|   798K  (1)|
    |   3 |    TABLE ACCESS FULL  | TABLE1   |    21M|   834M|       |   224K  (1)|
    |   4 |    VIEW               | VW_NSO_1 |    21M|  1364M|       |   440K  (1)|
    |   5 |     SORT GROUP BY     |          |    21M|   794M|  2453M|   440K  (1)|
    |   6 |      TABLE ACCESS FULL| TABLE1   |    21M|   794M|       |   224K  (1)|I'm using Oracle 10.2.0.3. The TABLE1 table has 21 million rows. The update stmt will update about 15 million rows. How can I rewrite this update stmt so it'll perform better? There is a primary index on all the columns selected in the subquery. That is the only index on TABLE1.
    Thank you!
    Edited by: user6053424 on Jul 21, 2010 6:59 AM

    Hi,
    Thank you for your suggestions. There is an index on the columns in the group by, it is the PK index on TABLE1. I'm suspecting that due to the amount of data to update, the optimizer decided that full table scan is cheaper than index scan. I'm very interested in the GTT idea, but still need some help if I decide to create a GTT from the subquery, because if I just do this:
    create global temporary table table1_tmp
    on commit preserve rows
    as SELECT comp#,polnum,a8dtef,a8deef,a8dtac,
               MAX(DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
          FROM TABLE1
         GROUP BY comp#,polnum,a8dtef,a8deef,a8dtac;then the original update stmt still has the DECODE and such in it, I'm not sure how much benefit that'll do to us:
    UPDATE TABLE1
                     SET mainveh = 'Y'
                 WHERE (comp#,polnum,a8dtef,a8deef,a8dtac,
                        DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
                    IN (SELECT comp#,polnum,a8dtef,a8deef,a8dtac,???
                          FROM TABLE1);Your input is greatly appreciated! Thanks!

  • How can I perform a bulk assignment to one Task

    Hi All,
    I would like to allow all resources to assign some of their time to a cProjects Task (XXXX Implementation plan). How can I perform a bulk assignment to this task, instead of performing individual assignments?
    Please help.
    Thanks,
    Srini

    Not quite sure I fully understand your question. When you go to the "roles" tab of a task you are allowed to assign multiple resources to a task either from the same role or different roles. The total work or effort for the task can be distributed accross the multiple assignments.

  • How to Manually Perform software Updates and tips for making Macbook better

    Hi. So recently my internet was really slow. I figured the problem out and now is working well. Although the youtube site does not allow me to view entire videos.
    Well...i was told that since my macbook is turned off at night, it cant perform software updates between 3am-6am...so how can i do these manually? or how can i change the update time to sometime in the evening?
    I heard these software updates are suppose to make the macbook run and perform better. what other things can i do to accomplish that?
    (Laymans terms, im new to the mac world)

    Select Software Update from the Apple menu. Or download the standalone updaters from Apple's download site - http://www.apple.com/support/downloads/. Or simply set the Check for Updates option in Software Update to whatever frequency you prefer. SU will notify you when updates are available.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • My ipod touch will no longer download new apps after i updated via apple store.How can i get the updates deleted or correct the problem moving forward?

    My ipod touch will no longer download new apps after I updated via apple store.It freezes now when I attempt to download and blanks the app off entirely . How can I reverse the updates or correct the problem moving forward?

    Basics from the manual are restart, reset, restore.
    Try those

  • How can I use Office Update without the Office CD?

    How can I use Office Update without the Office CD? On the microsoft website I've clicked the options which mean I shouldn't need the CD (which wasn't supplied with the laptop), but poartway through updating the service pack I get a request for the Office 2000 Professional CD.
    Any suggestions?

    Hi
    Did you mean a Office or One Note?
    As far as I know the One Note is a part of the Recovering Image and the CD is not delivered with the unit. Furthermore the Toshiba units are not delivered with the Office 2000 software.
    Nevertheless, did you check the update function in the Help i.e. in Word?
    There you will find a options called Check for Updates
    http://office.microsoft.com/en-us/officeupdate/default.aspx
    Bye

  • How can I get an updated safari browser?

    Hi.  I have a Macbook Pro, Mac OS X, version 10.6.8; I am getting error messages about updating my browser.  I checked the apple store to see if I could download a new version of Safari, but could not.  How can I get an updated safari browser at this time without downloading the new OS X Yosemite.  I know I might need to download the Yosemite, but would prefer to wait untill all the glitches are fixed.  I have learned that the Yosemite may cause wifi failure and e-mail connection problems.  Since I am not a computer expert, I don't need the headaches trying to figure out how what is wrong and how to fix a bug, so I would prefer to wait untill apple has totally fixed all the glitches that the Yosemite has. In the meanwhile, I just need to know how to go about updating a newer version of safari. I thing I have a 5.0
    I would be greatfull for your help or response.
    "New to this"
    <Subject Edited by Host>

    Safari 5.1.10 is the newest version for Snow Leopard, and all available Mac OS X upgrades other than Yosemite require a purchase. You may want to switch to another browser, such as Firefox, temporarily.
    (116963)

  • How can I get into updates in the app store on my ipod touch.  I am told that it cannot connect to the itunes store, How can I get into updates in the app store on my ipod touch.  I am told that it cannot connect to the itunes store

    How can I get into updates in the app store on my ipod touch.  I am told that it cannot connect to the itunes store, How can I get into updates in the app store on my ipod touch.  I am told that it cannot connect to the itunes store

    See thes previous discussions:
    App Store Updates (but only Updates)...: Apple Support Communities
    Apps suddenly don't update: Apple Support Communities

  • How can I assign a period (instead of B) in Keynote for blank screen so I can use a Logitech R800 presenter? An option in next version?

    I have recently bought a Logitech R800 presenter which works very well with Keynote on a MacBook Pro. The start/stop presentation key does not work but that can be easily fixed by assigning F5 to "Start presentation" for Keynote in the keyboard system preferences. The remaining issue is that the blank screen button sends a period (".") which works as a prompt for a blank screen in PowerPoint, but in Keynote it causes the slideshow to end. Keynote uses the letter "B" for blank screen.
    How can I assign a period (instead of B) in Keynote for blank screen? Some sort of work around would be very useful as I often use blank screen in my presentations and much prefer Keynote to PowerPoint.
    Perhaps it will be an option in next version of Keynote?
    Thanks

    As far as I know you can not change these keystrokes without changing the Program files. I am sure it is possible there, but I have no idea where to even start to tell you where to find it.
    Your best bet it to go to the Keynote Menu>Provide Keynote Feedback and let Apple know you would like the option to change them.

  • After getting an update from 10.6.8 many of my programs were no longer able to open. How can I undo the update or solve this problem another way?

    After getting an update from 10.6.8 many of my programs were no longer able to open. How can I undo the update or solve this problem another way?

    Do you have a bootable clone from prior to the update? If so, roll back with that.
    Are your apps that won't open PPC and do they need Rosetta? Do you need to activate Rosetta?
    Have you considered reinstalling 10.6 from your install disc and then coming forward with the 10.6.8 Combo Updater, then doing software update and not including whatever it was you installed that caused this propblem?
    By the way - what update was it that caused this problem?

  • I am using i 4 phone. recently I had a problem with my lap top and had formatted hard disk of it. Now I want to use sync data in my iphone back to itune n my lap top. how can I perform this task with out loosing data in my i phone.

    I am using i 4 phone. recently I had a problem with my lap top and had formatted hard disk of it. Now I want to sync data in my iphone back to itune on my lap top. how can I perform this task with out loosing data in my i phone.

    Hey floridiansue,
    Do you have an installed email program such as Microsoft Outlook?  If your email is through an online login, such as Gmail, etc, then one will have to create an email association with a program such as Microsoft Outlook on the PC for this Scan to Email system to function.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • How can i perform a search on my external hard drive on my mac pro os x 10.9.2 ?

    how can i perform a search on my external hard drive on my mac pro os x 10.9.2 ?

    Mac OS X 10.9.2 is 12 years newer than 9.2.x.    You need to make sure that Spotlight has indexed the external hard drive by adding it and removing it from Apple menu -> System Preferences -> Spotlight -> Privacy.   Check the menu for it:
    to determine if indexing is still going on, as it will say indexing.
    Alternatively, you can use a non-Spotlight tool, such as:
    http://apps.tempel.org/FindAnyFile/
    http://www.devontechnologies.com/products/freeware/ - EasyFind
    http://www.osxbytes.com/ - iFileX (note the MacUpdate link provided on osxbytes page has a Malware advertisement for MacKeeper, do not download).
    http://www.barebones.com/ Textwrangler has a Search file for content, which works on any Text file.

  • How can I perform this kind of range join query using DPL?

    How can I perform this kind of range join query using DPL?
    SELECT * from t where 1<=t.a<=2 and 3<=t.b<=5
    In this pdf : http://www.oracle.com/technology/products/berkeley-db/pdf/performing%20queries%20in%20oracle%20berkeley%20db%20java%20edition.pdf,
    It shows how to perform "Two equality-conditions query on a single primary database" just like SELECT * FROM tab WHERE col1 = A AND col2 = B using entity join class, but it does not give a solution about the range join query.

    I'm sorry, I think I've misled you. I suggested that you perform two queries and then take the intersection of the results. You could do this, but the solution to your query is much simpler. I'll correct my previous message.
    Your query is very simple to implement. You should perform the first part of query to get a cursor on the index for 'a' for the "1<=t.a<=2" part. Then simply iterate over that cursor, and process the entities where the "3<=t.b<=5" expression is true. You don't need a second index (on 'b') or another cursor.
    This is called "filtering" because you're iterating through entities that you obtain from one index, and selecting some entities for processing and discarding others. The white paper you mentioned has an example of filtering in combination with the use of an index.
    An alternative is to reverse the procedure above: use the index for 'b' to get a cursor for the "3<=t.b<=5" part of the query, then iterate and filter the results based on the "1<=t.a<=2" expression.
    If you're concerned about efficiency, you can choose the index (i.e., choose which of these two alternatives to implement) based on which part of the query you believe will return the smallest number of results. The less entities read, the faster the query.
    Contrary to what I said earlier, taking the intersection of two queries that are ANDed doesn't make sense -- filtering is the better solution. However, taking the union of two queries does make sense, when the queries are ORed. Sorry for the confusion.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for