Created
November 21, 2009 05:32
-
-
Save eight/240023 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 alnum2han(str in VARCHAR2) RETURN VARCHAR2 | |
/* | |
全角のアルファベット、数字を半角にする | |
*/ | |
IS | |
tmp varchar2(2000); | |
BEGIN | |
tmp := translate( | |
str, | |
'1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', | |
'1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' | |
); | |
RETURN tmp; | |
END alnum2han; | |
/ | |
SELECT alnum2han('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') FROM dual; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment