Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: anyone way to use a wildcard in a decode?
Case Can be Used here ...
Case When y Like '%A' Then 'XXXX' Else 'YYYY' End;
-- HTH Regards, Ganesh R "Ryan Gaffuri" <rgaffuri_at_cox.net> wrote in message news:1efdad5b.0306111155.78871856_at_posting.google.com...Received on Thu Jun 12 2003 - 00:15:51 CDT
> If I can manage this, I can condense about 10 insert statements into
> one and save alot of processing time.
>
> anyway to do this with a straight decode?
>
> ME>create table xx(y varchar2(20));
>
> Table created.
>
> ME>insert into xx values('ABCD');
>
> 1 row created.
> ME>commit;
>
> Commit complete.
>
> ME>select decode(y,'%A%','XXXXX') from xx;
>
>
> DECOD
> -----
>
>
> 1 row selected.
>
> ME>select decode(y,'%A%','XXXXX','BLAH') from xx
> MASTER_TEST2_at_BOBAIRD>/
>
> DECOD
> -----
> BLAH
![]() |
![]() |