以下的SQL是分隔A中的数字select rn
       REGEXP_SUBSTR(a, '[^,]+', 1, LEVEL) STR
  from (select a,rownum rn from t)
CONNECT BY LEVEL <= REGEXP_COUNT( a, ',') + 1
       and rn= prior rn
       and prior dbms_random.value is not null;注意:regexp_count在11g以后才能使用,如果是11g以前需换成
length(a)-length(replace(a,',',''))

解决方案 »

  1.   

    以下的SQL是分隔A中的数字select rn
           REGEXP_SUBSTR(a, '[^,]+', 1, LEVEL) STR
      from (select a,rownum rn from t)
    CONNECT BY LEVEL <= REGEXP_COUNT( a, ',') + 1
           and rn= prior rn
           and prior dbms_random.value is not null;注意:regexp_count在11g以后才能使用,如果是11g以前需换成
    length(a)-length(replace(a,',',''))
    正解,但是发现你select rn后少了个逗号,嘻嘻