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

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

Re: DECODE question

From: Otto Norse <ottonorse_at_yahoo.com>
Date: 6 Jul 2001 16:50:11 -0700
Message-ID: <5330c896.0107061550.31930181@posting.google.com>

"Jason" <jason_at_solid.freeserve.co.uk> wrote in message news:<9i4vcp$u2o$1_at_newsg4.svr.pol.co.uk>...

> Consider the following Access code. Basically, it looks at a field called
> RotaShift. If this is filled in, that is the field that is used, otherwise
> the field AltShift is used.
>
> IIf ( RotaShift IS NULL, AltShift, RotaShift) AS Shift
>
> Now in trying to translate this to Oracle, I have come up with :-
>
> DECODE (RotaShift, Null, AltShift, RotaShift) AS Shift
>

I think you want:

NVL(RotaShift, AltShift)

ON Received on Fri Jul 06 2001 - 18:50:11 CDT

Original text of this message

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