September 2002
Intermediate to advanced
1024 pages
30h 52m
English
DECOMPOSE
DECOMPOSE is the opposite of the COMPOSE function. It takes a Unicode string as input, and returns that string with any precomposed characters decomposed into their separate elements. Its specification is:
FUNCTION DECOMPOSE(string1 IN VARCHAR2) RETURN VARCHAR2The following example undoes the effect of the COMPOSE example shown earlier:
DECLARE x VARCHAR2(30); BEGIN x := 'ã is a composed character'; SELECT ASCIISTR(DECOMPOSE(x)) INTO x FROM dual; DBMS_OUTPUT.PUT_LINE(x); END;
The output is:
a\0303 is a composed character
In this case, the character ã in the input string has been decomposed into the letter “a” followed by the nonspacing character \0303 (indicating the tilde).
Like COMPOSE, DECOMPOSE cannot be invoked directly from a PL/SQL expression in Oracle 9i Release 1; you must invoke it from a SQL statement. This restriction is removed in Oracle9i Release 2.
Read now
Unlock full access