• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql

using CONVERT Function in oracle plsql

Oracle/SQL CONVERT Function

November 24, 2012 by techhoneyadmin

Oracle CONVERT FunctionSQL CONVERT Function is used to convert a string from one character set to another character set. Oracle CONVERT Function syntax and examples are listed below.


SQL CONVERT Function Syntax

SELECT CONVERT(string, character_set_to, [character_set_from])
FROM table_name;

In the above Oracle CONVERT Function Syntax:-

  • ‘string’ is the string to be converted
  • ‘character_set_to’ is the character set to which the string is to be converted
  • ‘character_set_from’ is the character set from which the string is to be converted

A character set for Oracle CONVERT Function can be any one of the following:

Character Set Explanation
US7ASCII US 7-bit ASCII character set
WE8DEC West European 8-bit character set
WE8HP HP West European Laserjet 8-bit character set
F7DEC DEC French 7-bit character set
WE8EBCDIC500 IBM West European EBCDIC Code Page 500
WE8PC850 IBM PC Code Page 850
WE8ISO8859P1 ISO 8859-1 West European 8-bit character set
US7ASCII US 7-bit ASCII character set

SQL CONVERT Function – Converting to US7ASCII from WE8EBCDIC500 Example

Oracle CONVERT Function is used with the SQL SELECT Statement for conversion.

For example, the Oracle CONVERT Function query below returns the value converted in ‘US7ASCII’ character set.

SELECT CONVERT('A B C D E Ä Ê Í Õ Ø', 'US7ASCII', 'WE8EBCDIC500')
FROM dual;

Will return ‘?a?a?a?a?D?-?o?N?Q’


SQL CONVERT Function – Converting to US7ASCII from WE8HP Example

the Oracle CONVERT Function query below returns the value converted in ‘US7ASCII’ character set.

SELECT CONVERT('A B C D E Ä Ê Í Õ Ø', 'US7ASCII', 'WE8HP')
FROM dual;

Will return ‘A B C D E a o e i A’


Filed Under: function Tagged With: CONVERT Function in oracle plsql, CONVERT Function in oracle sql, CONVERTPLSQL, how to use CONVERT Function in oracle database query, how to use CONVERT Function in oracle plsql, how to use CONVERT Function in oracle sql, syntax and example of CONVERT Function in oracle database query, syntax and example of CONVERT Function in oracle plsql, syntax and example of CONVERT Function in oracle sql, using CONVERT Function in oracle database query, using CONVERT Function in oracle plsql, using CONVERT Function in oracle sql

Copyright © 2025 · Parallax Pro on Genesis Framework · WordPress · Log in