MS SQL Server是否能够将数据转换为EBCDIC characer集。如果可能的话,我更喜欢EBCDIC 500。
我想知道是否有替代ORACLE CONVERT功能。如果需要重写SQL Server方言,请参阅以下ORACE语句。
转换功能:
SELECT CONVERT('Ä Ê Í Õ Ø A B C D E 123456 abcde ;!@#$%^&*()_+', 'WE8ISO8859P1', 'US7ASCII') FROM DUAL;
编辑:ORACLE转换函数的示例包括预期结果
示例1:
SELECT CONVERT('abcdefghijklmnopqrstuvwxyz ABCDEFHGIJKLMNOPQRSTUVWXYZ 0123456789 ~!@#$%^&*()_+=-[]{};:,./" Ä Ê Í Ó Ø', 'WE8EBCDIC500', 'AL32UTF8') FROM DUAL;
-- returns: @{[l_P\M]mN~`JZ^zkKa@c@r@u@
-- some non-visible chars has been stipped
示例2:
SELECT CONVERT('abcdefghijklmnopqrstuvwxyz ABCDEFHGIJKLMNOPQRSTUVWXYZ 0123456789 ~!@#$%^&*()_+=-[]{};:,./" Ä Ê Í Ó Ø', 'AL32UTF8', 'WE8EBCDIC500') FROM DUAL;
-- returns: /ÂÄÀÁÃÅÇѦ,%_>?øÉÊËÈÍÎÏÌ`: âäàáãçåñ[.<(+!&éêëèíîïìß]
-- some non-visible chars has been stipped
示例3:
SELECT CONVERT('/¦,%_>øÉÊËÈÍÎÏÌ`:âäàáãçåñ[.+!]', 'WE8EBCDIC500', 'AL32UTF8') FROM DUAL;
-- returns: ajklmnpqrstuvwxyz ABCDEFHGIJKNOZ Ä Ê Í Ó Ø
-- some non-visible chars has been stipped
来自Oracle Developer Studio的屏幕截图: