Converting special character to plain text in oracle

被刻印的时光 ゝ 提交于 2019-12-04 05:37:38

问题


we are having a database with utf8 as charset. now in one table we are having a value like 'HERBES-Herbe à poux' . now we have to convert it into 'HERBES-Herbe a poux' . i.e à-->a. We cannot have a replace function since the values are dynamic.

Please help us.


回答1:


What constitutes a "special character" to you? Anything outside the US7ASCII character set?

You can potentially use the CONVERT function

SELECT convert( <<your string>>, 'US7ASCII' )
  FROM table_name

Assuming that there is a mapping for the particular character to the US7ASCII character set, that mapping will be used to replace the character. If there is no mapping defined, the character will be replaced by the default replacement character, a question mark "?".



来源:https://stackoverflow.com/questions/12936570/converting-special-character-to-plain-text-in-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!