CREATE OR REPLACE
procedure pro_getBaseNo_BASEINFORMATION(str in varchar2,p_baseno out varchar2)
is
v_count number;
begin
select str||lpad(trunc(dbms_random.value(1,1000)),6,'0') into p_baseno from dual;
select count(*) into v_count from JP_BASEINFORMATION where base_no=p_baseno;
if(v_count=0) then
return;
end if;
end;
procedure pro_getBaseNo_BASEINFORMATION(str in varchar2,p_baseno out varchar2)
is
v_count number;
begin
select str||lpad(trunc(dbms_random.value(1,1000)),6,'0') into p_baseno from dual;
select count(*) into v_count from JP_BASEINFORMATION where base_no=p_baseno;
if(v_count=0) then
return;
end if;
end;