CONVERT

Convert a string from one character set to another.

Syntax
      convert( string , char_set_to , [ char_set_from ] )

Key
   string         String to be converted
   char_set_to    Character set to convert to.
   char_set_from  Character set to convert from.

Common character sets:

WE8ISO8859P1 ISO 8859-1 West European 8-bit character set
US7ASCII US 7-bit ASCII character set
JA16SJIS Japanese 16-bit Shifted Japanese Industrial Standard

The database character encoding scheme is defined as part of the CREATE DATABASE statement.
All SQL CHAR datatype columns (CHAR, CLOB, VARCHAR2, and LONG), including columns in the data dictionary, have their data stored in the database character set. In addition, the character set determines which characters can be used to name objects in the database.

Example

SQL> SELECT CONVERT('SÄMPLE TÊXT','US7ASCII','WE8ISO8859P1') FROM dual;

Related

Oracle SQL Functions
TO_NUMBER - Convert to numeric format
TO_CHAR - Convert to character String
TO_DATE - Convert to date format


© Copyright SS64.com 1999-2013
Some rights reserved