angoca / db2tools

Set of routines that can ease your daily work.
GNU General Public License v2.0
1 stars 0 forks source link

Upper function with special characters (Language aware collation) #19

Closed angoca closed 10 years ago

angoca commented 10 years ago

CREATE OR REPLACE FUNCTION UPPER_CASE( IN STRING VARCHAR(256) ) RETURN VARCHAR(256) UPPER_CASE: BEGIN -- Replaces á with Á SET STRING = REPLACE (STRING, u&'\00e1', u&'\00c1'); -- Replaces é with É SET STRING = REPLACE (STRING, u&'\00e9', u&'\00c9'); -- ... RETURN STRING; END UPPER_CASE @

angoca commented 10 years ago

It does exist:

-UPPER--(--string-expression--,--locale-name--+---------------+--+--------------------+--)->< '-,--code-units-' '-,--+-CODEUNITS16-+-'
+-CODEUNITS32-+
'-OCTETS------'