|
|
|
|
|
|
|
|
|
|
|
|
Re: Why DML operation cannot be performed inside query---ora:14451 [message #278109 is a reply to message #277927] |
Thu, 01 November 2007 18:27   |
 |
Kevin Meade
Messages: 2103 Registered: December 1999 Location: Connecticut USA
|
Senior Member |
|
|
Actually, insert,update,delete can be done from a select. I dont' like it, and have yet to be faced with a problem that could only be solved with it, and I think it is bad design, but...
It can be done. The trick is to use autonomous_transactions.
I do not remember at what release the autonomous_transaction was added. And I do not have access at the moment to an 8.1.7 version of oracle, so I cannot say that you can do it on your specific instance.
But, if you make the function an autonomous_transaction, the update will work.
Again however, it is ill advised. In fact, as I recall now, I wrote an article for OraFAQ which talks about autonomous_transactions. Go read it. It has I believe an example for you.
http://www.orafaq.com/node/1915
good luck, Kevin
|
|
|
Re: Why DML operation cannot be performed inside query---ora:14451 [message #278148 is a reply to message #278109] |
Fri, 02 November 2007 01:50   |
 |
Michel Cadot
Messages: 68764 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote: | It can be done. The trick is to use autonomous_transactions.
|
Actually all seniors posting here know that but, I think and this is my case, it is an option you can't suggest to newbies.
Even if you warn.
Remember, if something seems useful, no warn is read (even if you post it in bold, size 5, red, underline, blinking...) only "yes I can do it with this" is kept in memory.
Regards
Michel
|
|
|
|