Friday, 26 August 2016

How to determine the ascii value of a specific character within a row?



How to determine the ascii value of a specific character within a row?
Let's say we are searching for the character § inside the DB.



SQL> select dump('§') from dual;

DUMP('§')
---------------------
Typ=96 Len=2: 194,167

SQL> select * from k where col1 like '%'||chr(194)||'%'||chr(167)||'%';

COL1
--------------------------------------------------------------------------------
§

Thanks to the site below:

https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2143700800346224648

No comments:

Post a Comment