COLB变量中使用正则表达式替换?
这个如何做?用这个函数报错:regexp_replace

解决方案 »

  1.   

    regexp_replace 你的数据库是9I的?和我一样不能用
    只有哦10G版本以上才有这个函数
      

  2.   

    普通类型没问题呀,clob 类型老报错呀
      

  3.   

    1) regexp_replace 10g以上才有2)regexp_replace只支持字符串,CLOB转进去,也是隐式转为字符串的。假如CLOB过长,就会报错
      

  4.   

    Nod. 不超过4K的CLOB好像能处理。
      

  5.   

    REGEXP_REPLACE(source_char, pattern
                   [, replace_string
                      [, position
                         [, occurrence
                            [, match_parameter ]
                         ]
                      ]
                   ]
                  )source_char is a character expression that serves as the search value. It is commonly a character column and can be of any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB or NCLOB.
    pattern is the regular expression. It is usually a text literal and can be of any of the datatypes CHAR, VARCHAR2, NCHAR, or NVARCHAR2. It can contain up to 512 bytes. If the datatype of pattern is different from the datatype of source_char, Oracle Database converts pattern to the datatype of source_char. For a listing of the operators you can specify in pattern, please refer to Appendix C, "Oracle Regular Expression Support".replace_string can be of any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. If replace_string is a CLOB or NCLOB, then Oracle truncates replace_string to 32K. The replace_string can contain up to 500 backreferences to subexpressions in the form \n, where n is a number from 1 to 9. If n is the backslash character in replace_string, then you must precede it with the escape character (\\). For more information on backreference expressions, please refer to the notes to "Oracle Regular Expression Support", Table C-1.