Press "Enter" to skip to content

Oracle Convert() Function Example

In Oracle, convert() function converts the character string from the character set to a character set specified in parameters. If the source character set is not specified, it defaults to the character set of the database.

Syntax

convert(string, destination_set, [source_set])

Common Character Sets include those listed below:

Character Set IdentifierDescription
US7ASCIIU.S. 7-bit ASCII. This is the character set used by most Unix operating systems and Oracle databases on Unix.
WE8DECDEC West European 8-bit.
WE8HPHP West European Laserjet 8-bit.
F7DECDEC French 7-bit.
WE8EBCDIC500IBM West European EBCDIC Code Page 500. This is a character set used by most PC systems and by Oracle running on PCs.
WE8ISO8859P1ISO-8859-1 West European 8-bit.

For complete conversion, the destination character set should contain a representation of all the characters in the source character set. If not, then a replacement character set is used in the destination. This replacement character is part of the character set definition itself.

Example

Select convert('Groß', 'WE8HP', 'WE8DEC') "Conversion" from Dual;

Output

Conversion
-----------
Groß

See also:

Vinish Kapoor

FoxInfotech.in is created, written, and maintained by Vinish Kapoor. It is built on WordPress, and hosted by Bluehost. Connect with Vinish on Facebook, Twitter, and GitHub.

You may also like: