Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Updating a table with a function call - pragma problems!
I don't think it's because the function has to look at the database to run
the procedure. Certainly it is allowed to do that. But I believe it is
because Oracle can't tell what kind of magic (DML) you may be performing
within the procedure. Oracle doesn't want any INSERTs, UPDATEs, or DELETEs
in a function that is called within a SQL statement. Because the procedure
may have such statements in it, Oracle would just rather disallow the
procedure call altogether, to avoid the trouble, so to speak. If there are
no INSERT, UPDATE, or DELETE statements in the procedure you are planning to
call, I think your only option is to stick that code, however complicated,
in the function itself.
I may be wrong in saying that is your ONLY option. If I am, I hope you get a few more responses. Good luck. Received on Wed Dec 02 1998 - 22:38:16 CST