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

Home -> Community -> Usenet -> c.d.o.misc -> Re: question about DECODE

Re: question about DECODE

From: Cynic <ksd9_at_yahoo.com>
Date: Wed, 14 Aug 2002 20:03:23 -0400
Message-ID: <ullrvl1jf45n8e@corp.supernews.com>


Thank you!!
That was exactly what I was looking for.

"Martin Doherty" <martin.doherty_at_oracle.com> wrote in message news:3D5AD6C1.B6EDB8B5_at_oracle.com...
> begin
> select decode (PSEG.PSCDE || PSPLN.PLNFLAG
> ,'PLANY', 1
> , 0)
> into p_bill
> from ...
> where ...;
> exception
> when others then null;
> end;
>
>
> Cynic wrote:
>
> > I think DECODE is what I'm looking for, but I can't seem to figure out
how
> > it works.
> >
> > Here's what I have... I have a field called P_BILL.
> > If PSEG.PSCDE = 'PLAN' and PSPLN.PLNFLAG = 'Y', then I need the P_BILL
> > field to be 1. Otherwise, 0.
> >
> > Any suggestions?? Or any good references for DECODE??
> >
> > Thanks
>
Received on Wed Aug 14 2002 - 19:03:23 CDT

Original text of this message

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