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

Home -> Community -> Usenet -> c.d.o.misc -> insert in function not possible?

insert in function not possible?

From: Jan Rosinowski <rosinowski_at_gmx.de>
Date: Tue, 15 Dec 1998 12:34:10 GMT
Message-ID: <367755c2.518613446@bigXb>


in sqlaw it's common practice to use functions like

create function f_newfoo(bar varchar)
as
begin
  insert into foo(b) values (bar);
  return @@identity;
end

try this in oarcle gives an ora-6571 ?!

what's wrong? why can't i modify the database in a function? using a stored proc seems to work but actually it's crap to use a procedure with an out-parameter to simulate a function.

how do i retrieve the current sequencevalue correctly?

ciao, jan Received on Tue Dec 15 1998 - 06:34:10 CST

Original text of this message

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