Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: case when ... then expression
<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
![]() |
![]() |