oarcle 提取数字函数

mac2022-06-30  70

View Code create or replace function get_number(str varchar2)return varchar2 is v_rs varchar2(4000);beginif str is null thenreturn null;elsefor i IN 1 .. length(str) loopif ascii(substr(str, i, 1)) between 48 and 57 then v_rs := v_rs || substr(str, i, 1);end if;end loop;return v_rs;end if;end;select get_number('aa2') from dual;

转载于:https://www.cnblogs.com/Mr0909/archive/2011/12/05/2276538.html

相关资源:oracle通过sql实现字符串转数字oracle函数
最新回复(0)