|
更好更短地执行此代码:
% l8 w( G7 c8 c/ ]/*Replace all letters by their respective ASCII code - 55*/as_iban := REPLACE(as_iban,'A,十;as_iban := REPLACE(as_iban,'B,11;as_iban := REPLACE(as_iban,'C,12;as_iban := REPLACE(as_iban,'D,13;as_iban := REPLACE(as_iban,'E,14;as_iban := REPLACE(as_iban,'F,十五;as_iban := REPLACE(as_iban,'G,16;as_iban := REPLACE(as_iban,'H,17;as_iban := REPLACE(as_iban,'I,18;as_iban := REPLACE(as_iban,'J,19;as_iban := REPLACE(as_iban,'K,二十;as_iban := REPLACE(as_iban,'L二十一;as_iban := REPLACE(as_iban,'M,二二;as_iban := REPLACE(as_iban,'N,;as_iban := REPLACE(as_iban,'O','24');as_iban := REPLACE(as_iban,'P,二五;as_iban := REPLACE(as_iban,'Q,二六;as_iban := REPLACE(as_iban,'R,;as_iban := REPLACE(as_iban,'S,;as_iban := REPLACE(as_iban,'T,;as_iban := REPLACE(as_iban,'U,三十;as_iban := REPLACE(as_iban,'V三十一;as_iban := REPLACE(as_iban,'W,三二;as_iban := REPLACE(as_iban,'X,三三;as_iban := REPLACE(as_iban,'Y三四;as_iban := REPLACE(as_iban,'Z,三五;上述代码将字符串的所有高位字符转换为相应的ASCII编号。但这不是解决问题的正确方法,但我不知道另一种解决方案。
7 y1 S; h- D* x7 {* V0 R3 j我试过类似的东西4 K& h5 B* E( \* V( _( G
FOR i in 1..LENGTH(as_iban)LOOPselect regexp_replace(as_iban,'['||substr(as_iban,i,1)||']',ASCII(regexp_substr(as_iban,'['||substr(as_iban,i,1)||) - 55) into as_iban FROM dual;END LOOP; 6 A; t0 d% f' D" e
解决方案: |
|