Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Help on ORA-06573: Function name modifies package state ?????
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' ) ;
end;
end ; Received on Thu Nov 18 1999 - 02:17:09 CST