Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Case Statement
Documented and working, e.g.
select
case
when (to_char(sysdate,’hh24’) < 6) then ‘Early’ when (to_char(sysdate,’hh24’) between 6 and 11) then ‘AM’ when (to_char(sysdate,’hh24’) between 12 and 18)then ‘PM’ when (to_char(sysdate,’hh24’) > 18 )then ‘Late’end as time_of_day
(Extracted from Ch. 23 - Number Crunching -
Practical Oracle 8i - pub AWL
Oops, accidental commercial in technical newsgroup).
-- Jonathan Lewis Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk Practical Oracle 8i: Building Efficient Databases Publishers: Addison Wesley Longman Book bound date now 1st Dec 2000 Connor McDonald wrote in message <3A071017.272A_at_yahoo.com>...Received on Mon Nov 06 2000 - 15:35:22 CST
>corvax_kg_at_my-deja.com wrote:
>>
>> No. CASE statement is not supported in Oracle8.
>> This statement will be supported in Oracle9i. :)
>> Wait for Oracle9i full release.
>>
>> In article <OnFYrRfRAHA.369_at_cpmsnbbsa07>,
>> "Mason Liu" <masonliu_at_msn.com> wrote:
>> > Does Oracle8 support the case statement in SELECT.
>> >
>> > For example:
>> >
>> > SELECT (CASE col_a WHEN 1 THEN 'ONE' WHEN 2 THEN 'TWO' ELSE 'UNKNOWN'
END)
>> > FROM table...
>> >
>> > I know decode() can accomplish this, but I like to know this for
migration
>> > reasons.
>> >
>> > Thanks,
>> >
>> > Mason Liu
>> >
>> >
>>
>> Sent via Deja.com http://www.deja.com/
>> Before you buy.
>
>Its in 8.1.6 - well at least according to the 8.1.6 doco it is.
>
>HTH
>--
>==============================
>Connor McDonald
>
>http://www.oracledba.co.uk
>
>"Some days you're the pigeon, some days you're the statue..."
![]() |
![]() |