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: insert in function not possible?

Re: insert in function not possible?

From: Jan Rosinowski <rosinowski_at_gmx.de>
Date: Wed, 16 Dec 1998 10:48:14 GMT
Message-ID: <36786cd6.524521882@bigXb>


>You cannot modify the database in a function you call from a SQL statement such
>as select, insert, update, delete. You must be trying to run the function from
>a 'select f_newfoo('x') from dual;'.

that's exactly what i tried as..

>Instead, if you are in sqlplus just:
>
>SQL> set serveroutput on
>SQL> exec dbms_output.put_line( f_newfoo( 'x' ) );

... i don't know how to get this returnvalue without a select when using delphi's tdataset-components.

> :my_host_variable := f_newfoo( 'x' );

is also impossible for me.

do i really have to issue a series of queries like

  insert into foo(bar) values('ba');

  select seq_foo.currval as retrievedcurrseq from dual;

  update foo set moreinfo='bla' where foseq=:retrievedcurrseq;

?

sorry, i'm an oracle newbie coming from sybase

ciao, jan Received on Wed Dec 16 1998 - 04:48:14 CST

Original text of this message

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