表:picture 
字段:picture_source
picture中的字段如下:
   110鎸囨尌涓績
   110指挥中心
   政府
   群众
   政府单位,政府单位
   政府单位,啊达到
   .....
我现在想将这个字段变成:
   110鎸囨尌涓
   110指挥中心
   政府
   群众
   政府单位
   政府单位
   .....
也就是把所有非文字后面的内容去掉,请问怎么弄呢?别太复杂

解决方案 »

  1.   

    系统通过前置x’0e’字节和后置x’0f’字节来标识双字节汉字串。
     使用 c_check  函数
     
      

  2.   

    select REGEXP_SUBSTR(v,'[^]+') as v from( 
    select '110鎸囨尌涓績' as v from dual union
      select '110指挥中心' from dual)
     /*
     V
    110指挥中心
    110鎸囨尌涓
    */
      

  3.   

    select REGEXP_SUBSTR(v,'\w+') as v
     from(  select '110鎸囨尌涓績' as v from dual union  select '110指挥中心' from dual)
      /*  V 110指挥中心 110鎸囨尌涓 */