Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle For Fun
create table t2(x varchar2(20));
insert into t2 values('123-456-7893'); insert into t2 values('12-3456-7893'); insert into t2 values('-12345-67893');
create or replace function valid_code ( p_code in varchar2 )
return boolean
is
begin
return translate(nvl(p_code,'?'),'0123456789#','##########?') = '###-###-####';
end;
select x,valid_code(x) from t2;
ERROR at line 1:
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-382: expression is of wrong type
??????? Received on Thu Jan 29 2004 - 15:18:36 CST