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

Home -> Community -> Usenet -> c.d.o.server -> Re: case ansi 92

Re: case ansi 92

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 19 Jan 2000 10:42:32 -0500
Message-ID: <bmmb8s4jn8en2gggg967k9kodt4hjlija5@4ax.com>


A copy of this was sent to rrenzo_at_my-deja.com (if that email address didn't require changing) On Wed, 19 Jan 2000 15:10:32 GMT, you wrote:

>It is not possible to use this ANSI 92 clause
>
>SELECT
>CASE
> WHEN t.c='xx' THEN t.a ELSE t.b
>END
>FROM t
>

select decode( t.c, 'XX', t.a, t.b ) from t

>Oracle does conform to ANSI 92 rules, don't they?
>How can I rewrite this query in a working version?
>

Yes it does, there are 4 levels of ANSI 92. Entry Level, Intermediate, Transitional, Full.

No one has ever certified over entry level. Case is not part of entry level. We are entry level compliant. We (and others) satisfy various components of the higher levels but none satisfy all of the req's of the higher levels syntactically.

CASE is supported in Oracle8i release2 (8.1.6) as a new syntax element in SQL Queries. Prior to that, decode is the function we have to perform a similar operation.

>Greetings,
>Renzo.
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Jan 19 2000 - 09:42:32 CST

Original text of this message

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