Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> DML within a function

DML within a function

From: Jan SALVA <salva_at_avlas.cz>
Date: Tue, 16 Nov 2004 14:36:23 +0100
Message-ID: <000b01c4cbe1$435e7340$0a01000a@msmv>


Hello all,
when I use update command within a user defined function, I got = ORA-06512 error: Can't use DML within a function. Is ANY possibility to modify data within a function? Some dynamic sql or = other feature?
Why I need it:
In my db - primary key values are set by application, it mean that last = used Id is in "counters" table. Unfortunatelly sequence objects aren't = used. When I need new Id, i get it with stored procedure, which handles = my "counters" table. The big disadvantage is that I can't use this = schema for multi-row inserts, I must use cursors :-(. I know that this = is bad solution, but I can't do anything with it now and I need improve = db performance. If I have function, which handles my counters table, I = would use it directly in insert command without cursor need. Thank you for any answers.

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Nov 16 2004 - 07:28:48 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US