Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: question about DECODE
begin
select decode (PSEG.PSCDE || PSPLN.PLNFLAG
,'PLANY', 1 , 0)
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