Compare Strings ignoring accents in SQL (ORACLE)

后端 未结 4 1820
说谎
说谎 2020-12-17 20:36

I would like to know if there is an easy way to compare two text values ignoring the accents and upper case. Im working with an Oracle database. I already searched for an an

4条回答
  •  星月不相逢
    2020-12-17 21:10

    This works for Ç and the rest of characters in PT-BR (Portuguese - Brazil):

    SELECT CONVERT( 'ÃÕÑ ÁÉÍ Ç', 'SF7ASCII' ) FROM DUAL;
    Result: **AON AEI C**
    

    Check your database version:

    SELECT * FROM V$VERSION;
       Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
        PL/SQL Release 11.2.0.1.0 - Production
        "CORE   11.2.0.1.0  Production"
        TNS for Linux: Version 11.2.0.1.0 - Production
        NLSRTL Version 11.2.0.1.0 - Production
    

提交回复
热议问题