本帖最后由 shii_u 于 2012-11-19 09:14:40 编辑

解决方案 »

  1.   

    SELECT substr('4、减速机有异常声音',instr('4、减速机有异常声音','、')+1,length('4、减速机有异常声音')) FROM dual;
      

  2.   


    with t1 as
    (
         select 1 id,'循环风机:2、风机电机有异常声音。' Result from dual
         union all
         select 2 id,' 3000线滚筒减速机:4、减速机有异常声音。' Result from dual
    )select substr(Result,instr(Result,'、')+1,length(Result)-instr(Result,'、')-1) c1
    from t1
                c1
    ----------------------------------
    1 风机电机有异常声音
    2 减速机有异常声音
      

  3.   

    select substr(col,instr(a.col,'、') +1,instr(a.col,'。') - instr(a.col,'、') -1) from 
    (select '循环风机:2、风机电机有异常声音。' col from dual ) a
      

  4.   

      SUBSTR(CHECKPOINT_RESULT,
                  INSTR(CHECKPOINT_RESULT, '、')+1,
                  INSTR(CHECKPOINT_RESULT, '。') -
                  INSTR(CHECKPOINT_RESULT, '、')-1)
     简单的介绍下,INSTR(CHECKPOINT_RESULT, '、')表示得到字符串中第一个出现、的位置。然后用substr函数
      

  5.   

    select regexp_substr(columnname,'、.*。') from tablename