create or replace function blob_to_string (blob_loc IN BLOB) RETURN VARCHAR2 IS v_blength number; v_ret varchar(32767); v_amount binary_integer:=10000; v_offset integer:=1; v_buffer raw(20000); BEGIN v_blength:=dbms_lob.getlength(blob_loc); IF v_blength=0 THEN return v_ret; ELSE if v_blength