Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: insert in function not possible?
>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
![]() |
![]() |