WITH 
  FUNCTION greatest_subsequential_sum(p_list IN varchar2, p_delimiter IN varchar2) RETURN varchar2 IS 
    -- Variablen
    v_list       varchar2(32767):= TRIM(BOTH p_delimiter FROM p_list);
    v_substr_i   varchar2(32767);
    v_substr_j   varchar2(32767);
    v_substr_out varchar2(32767);
    v_res        INTEGER:= 0;
    v_res_out    INTEGER:= 0;
    --
  BEGIN
     --
     v_list:= regexp_replace(v_list,''||chr(92)||p_delimiter||'{2,}',p_delimiter);
     --
     FOR i IN 1..nvl(regexp_count(v_list,'[^'||p_delimiter||']+'),0)
     loop
       v_substr_i:= substr(v_list,regexp_instr(v_list,'[^'||p_delimiter||']+',1,i));
       --
       FOR j IN reverse 1..regexp_count(v_substr_i,'[^'||p_delimiter||']+')
       loop
         --
         v_substr_j:= TRIM(BOTH p_delimiter FROM substr(v_substr_i,1,regexp_instr(v_substr_i,'[^'||p_delimiter||']+',1,j,1)));
         EXECUTE immediate 'select sum('||REPLACE(v_substr_j,p_delimiter,'+')||') from dual' INTO v_res;
         --
         IF v_res > v_res_out THEN
            v_res_out:= v_res;
            v_substr_out:= '{'||v_substr_j||'}';
         elsif v_res = v_res_out THEN
            v_res_out:= v_res;
            v_substr_out:= v_substr_out||',{'||v_substr_j||'}';
         END IF;
         --
      END loop;
      --
   END loop;
   --   
   v_substr_out:= TRIM(BOTH ',' FROM nvl(v_substr_out,'{}'));
   v_substr_out:= CASE WHEN regexp_count(v_substr_out,'},{')>0 THEN 'subsequences '||v_substr_out ELSE 'a subsequence '||v_substr_out END;
   RETURN 'The maximum sum '||v_res_out||' belongs to '||v_substr_out||' of the main sequence {'||p_list||'}';
END;

--Test
SELECT greatest_subsequential_sum('-1|-2|-3|-4|-5|', '|') AS  FROM dual
UNION ALL
SELECT greatest_subsequential_sum('', '') FROM dual
UNION ALL
SELECT greatest_subsequential_sum('     ', ' ') FROM dual
UNION ALL
SELECT greatest_subsequential_sum(';;;;;;+1;;;;;;;;;;;;;2;+3;4;;;;-5;;;;', ';') FROM dual
UNION ALL
SELECT greatest_subsequential_sum('-1,-2,+3,,,,,,,,,,,,+5,+6,-2,-1,+4,-4,+2,-1', ',') FROM dual
UNION ALL
SELECT greatest_subsequential_sum(',+7,-6,-8,+5,-2,-6,+7,+4,+8,-9,-3,+2,+6,-4,-6,,', ',') FROM dual
UNION ALL 
SELECT greatest_subsequential_sum('01 +2 3 +4 05 -8 -9 -20 40 25 -5', ' ') FROM dual
UNION ALL 
SELECT greatest_subsequential_sum('1 2 3 0 0  -99 02 03 00001 -99 3 2 1 -99 3 1 2 0', ' ') FROM dual
UNION ALL 
SELECT greatest_subsequential_sum('0,0,1,0', ',') FROM dual
UNION ALL 
SELECT greatest_subsequential_sum('0,0,0', ',') FROM dual
UNION ALL 
SELECT greatest_subsequential_sum('1,-1,+1', ',') FROM dual;