--THIS FILE IS NEEDED ONLY FOR THE ONLINE UPDATE OR WHEN UPGRADING FROM VERSION 8.8.2.4!!!

CREATE OR REPLACE FUNCTION LONG_TO_CHAR( in_rowid rowid, in_table_name varchar,in_column varchar2) 
RETURN varchar AS 

text_c1 varchar2(32767);
sql_cur varchar2(2000);
--
begin
  sql_cur := 'select '||in_column||' from ' ||in_table_name||' where rowid =
'||chr(39)||in_rowid||chr(39);
  dbms_output.put_line (sql_cur);
  execute immediate sql_cur into text_c1;

  text_c1 := substr(text_c1, 1, 4000);
  RETURN TEXT_C1;  
END;
/
