Compare Strings ignoring accents in SQL (ORACLE)

后端 未结 4 1827
说谎
说谎 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 20:50

    use the nlssort function in the following way:

    select * from  where utl_raw.cast_to_varchar2((nlssort(, 'nls_sort=binary_ai'))) like 'pe%';
    

    The nlssort call transforms accented characters to their linguistic bases and ignores case in comparisons.

    Original source is this article (verified on 12c).

提交回复
热议问题