Quick Search:
 
 Oracle PL/SQL: CONVERT Jump to:  
Category: >> Oracle PL/SQL >> CONVERT  

<< lastnext >>

Snippet Name: CONVERT

Description: Converts a character string from one character set to another. The datatype of the returned value is VARCHAR2.

The char argument is the value to be converted. It can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB.

The dest_char_set argument is the name of the character set to which char is converted.

The source_char_set argument is the name of the character set in which char is stored in the database. The default value is the database character set.

Both the destination and source character set arguments can be either literals or columns containing the name of the character set.

Also see:
» Add PSOUG Search to SQL Developer
» Converting Rows to Columns
» UNISTR
» TRANSLATE
» TO_YMINTERVAL
» TO_TIMESTAMP_TZ
» TO_TIMESTAMP
» TO_SINGLE_BYTE
» TO_NUMBER
» TO_NCLOB
» TO_NCHAR
» TO_MULTI_BYTE
» TO_LOB
» TO_DSINTERVAL
» TO_DATE
» TO_CLOB
» TO_CHAR
» TO_BINARY_FLOAT
» TO_BINARY_DOUBLE
» TIMESTAMP_TO_SCN
» SCN_TO_TIMESTAMP
» ROWIDTONCHAR
» ROWIDTOCHAR
» REFTOHEX
» RAWTONHEX
» RAWTOHEX
» NUMTOYMINTERVAL
» NUMTODSINTERVAL
» HEXTORAW
» DECOMPOSE

Comment: (none)

Language: PL/SQL
Highlight Mode: PLSQL
Last Modified: March 05th, 2009

CONVERT(<char>, <dest_char_set>, <source_char_set>)
 
 
-- This example illustrates character set conversion by 
-- converting a Latin-1 string to ASCII. The result is the 
-- same as importing the same string from a WE8ISO8859P1 
-- database to a US7ASCII database.
 
SELECT CONVERT('Ä Ê Í Ó Ø A B C D E ', 'US7ASCII', 'WE8ISO8859P1') 
   FROM DUAL; 
 
CONVERT('ÄÊÍÓØABCDE' 
--------------------- 
A E I ? ? A B C D E ? 
 
/* Common character sets include:
US7ASCII: US 7-bit ASCII character set
WE8DEC: West European 8-bit character set
F7DEC: DEC French 7-bit character set
WE8EBCDIC500: IBM West European EBCDIC Code Page 500
WE8ISO8859P1: ISO 8859-1 West European 8-bit character set
UTF8: Unicode 4.0 UTF-8 Universal character set, CESU-8 compliant
AL32UTF8: Unicode 4.0 UTF-8 Universal character set
*/


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org