Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help on ORA-06573: Function name modifies package state ?????
A copy of this was sent to "Fred Iworth" <fiworth_at_global.co.za>
(if that email address didn't require changing)
On Thu, 18 Nov 1999 10:17:09 +0200, you wrote:
>
>Hi
>
>Does any one understand or can explain how to get arround the following
>error :
>
>General SQL error. ORA-06573:
>
>Function GETTERMINATIONTYPE modifies package state, cannot be used here
>
>SAMPLE SQL Statement : select count(*) from LMTERMNL
>where eq_key = '00000153' and TR_TERM_TYPE = (select
>substr(GETTERMINATIONTYPE ('E' , 'CAB'),1,1) from
>DUAL)
>
>The function is not part of a package. GETTERMINATIONTYPE is a Oracle
>Function - see code below :
>
>Thanks
>
>Fred
>fiworth_at_global.co.za
>
>create or replace function GETTERMINATIONTYPE ( side string , eccode
>string ) return string is
> resultstr char(1) ;
>begin
> begin
> if side='E' then
> select substr(EC_CONN_TYPES,1,1) into resultstr
> from LMEQCLAS A where EC_CODE = eccode ;
> end if ;
>
> if side='D' then
> select substr(EC_CONN_TYPES,2,1) into resultstr
> from LMEQCLAS A where EC_CODE = eccode ;
> end if ;
>
> return ( resultstr );
>
> exception
> when others then
> raise_exception ( 'FN GETTERMINATIONTYPE' ) ;
I'll betcha the function raise_exception calls a packaged procedure/function that modifies the package state OR if the packaged procedure/function it does call does not modify the package state - you do not have the necessary pragmas on the package.
> end;
>
>end ;
>
>
>
--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Nov 18 1999 - 07:45:35 CST
![]() |
![]() |