create or replace procedure get_Area_Phone(i_phoneNum in varchar2,--传入号码
o_phoneFlag out varchar2,--返回手机号码1,固话2,其他0
o_resultNum out varchar2)
is
iv_province varchar2(50);
iv_phoneNum varchar2(50);
iv_count number;
iv_zipCode2 varchar2(50);
iv_zipCode varchar2(50);
v_strNum VARCHAR2(30);
v_400_phoneNum varchar2(50);
begin
iv_count := 0;
o_phoneFlag := '0';
--判断手机号码还是固话
if REGEXP_LIKE(i_phoneNum,'^1[3458]\d{9}$') then --判断手机号码
v_strNum := substr(i_phoneNum,0,7);
o_phoneFlag := '1';
select dpn.PROVINCE_NAME into iv_province from DIC_PHONE_NUM dpn WHERE dpn.MOBILE_NUMBER = v_strNum;
elsif REGEXP_LIKE(i_phoneNum,'^(010|02\d|0[3-9]\d{2})?\d{6,8}$') then --判断固话
iv_zipCod