Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: DECODE
Sherman H. wrote:
> I have to run a query to give a column a value based on a time range. Can I
> use DECODE?
>
> select decode(trans_date, trans_date>='01-Jul-2002' and
> trans_date<='30-Jun-2003','Fiscal2002', .....) as fiscal,
> from. . .
> where. . .
>
>
Not for expression evaluation. Use CASE instead (assuming that you are
on an 8i+ version).
Received on Thu Apr 01 2004 - 16:29:56 CST
![]() |
![]() |