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 -> Re: Functions that Insert data and return value

Re: Functions that Insert data and return value

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Wed, 8 Dec 1999 09:51:26 +0100
Message-ID: <82l5vo$10qpv$1@oceanite.cybercable.fr>


With SQL*PLus you can use:
var id number
begin

   :id := get_equip_id;
end;
/
then id variable contains your new id.

With other tools or languages you can use a similar structure with a bind variable.

--
Have a nice day
Michel

Gates <twofourblue_at_yahoo.com> a écrit dans le message : 384D659E.642F01_at_yahoo.com...
> I created a function that creates a record in a table and returns the id
> of this record. Unfortunately I keep getting the following:
>
> 'Function GET_EQUIP_ID does not guarantee not to update database'.
>
> I searched and found out that to use a function in SQL the function
> could not have any side effects. Is there any way around this? It
> seemed like a very simple problem at first...
>
> Thanks
>
> Gates
Received on Wed Dec 08 1999 - 02:51:26 CST

Original text of this message

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