如何转化 ASCII to EBCDIC conversion

Oracle:

Description of convert.gif follows

 

select convert('ABCD005','WE8EBCDIC500','US7ASCII') str, 'ABCD005' from  dual

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

由于字符集的不同, 字符串比较的结果就不同,所以在比较前需要把字符转换成同一种字符集然后比较大小。结果就会一样

例如:an EBCDIC-Based Sequence

select convert(min(str),'US7ASCII','WE8EBCDIC500') max_str from (

select convert('ABCD005','WE8EBCDIC500','US7ASCII') str, 'ABCD005' from  dual
union all
select convert('AcCD005','WE8EBCDIC500','US7ASCII') str, 'AcCD005' from  dual
union all
select convert('ADD005','WE8EBCDIC500','US7ASCII') str ,'ADD005' from  dual
)

 

https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions027.htm

https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:259215259051

你可能感兴趣的:(oracle)