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 -> Help on ORA-06573: Function name modifies package state ?????

Help on ORA-06573: Function name modifies package state ?????

From: Fred Iworth <fiworth_at_global.co.za>
Date: Thu, 18 Nov 1999 10:17:09 +0200
Message-ID: <3833b522.0@news1.mweb.co.za>

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

Original text of this message

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