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: case when ... then expression

Re: case when ... then expression

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 25 Jun 2001 22:55:01 -0700
Message-ID: <3B3823B5.AD60DF23@exesolutions.com>

<comments interspersed>

Jonathan Lewis wrote:

> First I don't think you can do:
> m_variable := decode(....);
> and that may have been the requirement.

Of course you can. That is the basic format of the function. Perhaps you should examine PL/SQL.

> Second it's a pain in the backside using
> decode() with range tests, as required by
> the original post.

You're right. Really painful to type <=.

If you don't even know the basic structure of DECODE, see above, exactly how can you comment on using it with ranges?

> Third
> CASE
> is new, improved, fresh out of the box,
> technology ;)

Which does absolutely nothing not done by DECODE. But it might also interest you that CASE has been around in database languages I've worked with for more than 20 years.

Please don't follow-up. The fact that you didn't know the basic syntax for the function pretty much answered any question I might have had.

Daniel A. Morgan Received on Tue Jun 26 2001 - 00:55:01 CDT

Original text of this message

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