Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle For Fun

Re: Oracle For Fun

From: zhix <zmilos_at_sympatico.ca>
Date: 29 Jan 2004 13:18:36 -0800
Message-ID: <c59f4459.0401291318.78ce97b@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US