有一个字符串如下:
"select f1 Code, f2 Value from tb1 where f3 = 'Code'"

"select f1 CODE, f2 Value from tb1 where f3 = 'Code'"

"select f1 Code, f2 VALUE from tb1 where f3 = 'Code'"

"select f1 CODE , f2 VALUE from tb1 where f3 = 'Code'"

"select f1 Code, f2 Value from tb1 where f3 = 'Code' order by VALUE "
凡此种种,想统一替换成"select f1 编码 , f2 名称 from tb1 where f3 = 'Code'"

"select f1 编码, f2 名称 from tb1 where f3 = 'Code' order by 名称 " 

解决方案 »

  1.   

    replace('select f1 Code, f2 Value from tb1 where f3 = ''Code''','code','编码')
      

  2.   

    select replace('select f1 Code, f2 Value from tb1 where f3 = ''Code''','code','编码') from dual的结果是
    "select f1 Code, f2 Value from tb1 where f3 = 'Code'"
      

  3.   

    我的这些字符串("select f1 Code, f2 Value from tb1 where f3 = 'Code'"等)是存在数据表里一个字段下的