Created
November 21, 2009 05:34
-
-
Save eight/240025 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION hanzen(str in VARCHAR2) RETURN VARCHAR2 | |
/* | |
全角のアルファベット、数字を半角にして、半角カナを全角にして、他の記号もいい感じにする | |
*/ | |
IS | |
tmp varchar2(2000); | |
BEGIN | |
tmp := alnum2han(han2zen(str)); | |
tmp := translate( | |
tmp, | |
'|=+-/@!”’#$%&;: ', | |
'|=+-/@!"''#$%&;: ' | |
); | |
RETURN tmp; | |
END hanzen; | |
/ | |
SELECT hanzen(' ィァァィ<><>;:”()=!%$#’アイウエオカ|=+-/@!”’#$%&();:[]【】〔〕<>¥^キクケコザズゾざずぞザズダド1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') FROM dual; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment