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: PL/SQL does not recognize CASE WHEN ELSE END construct as a valid expression

Re: PL/SQL does not recognize CASE WHEN ELSE END construct as a valid expression

From: <Kenneth>
Date: Wed, 31 Jul 2002 13:46:40 GMT
Message-ID: <3d47e95a.4186239@news.capgemini.se>


On 31 Jul 2002 06:33:23 -0700, mark.powell_at_eds.com (Mark D Powell) wrote:

>"FC" <flavio_at_tin.it> wrote in message news:<qXD19.160377$vm5.5380602_at_news2.tin.it>...
>> Hello,
>> did anybody come across the following on Win2K Ora 8.1.7.0.0 EE?
>>
>> While I am allowed to use the CASE WHEN ELSE END construct within ordinary
>> SQL, I cannot use it within PL/SQL modules (syntax error occurs). On the
>> other hand I can use the DECODE function, although it's harder to code in
>> certain cases.
>> I couldn't find any document stating that PL/SQL does not support this
>> feature.
>>
>> Bye...
>> Flavio

Hi Flavio,

I experienced exactly the same problem some time ago, when I defined a static PL/SQL cursor with a CASE...WHEN expression and got a syntax error.. When I defined the same cursor DYNAMICALLY, it worked !

>
>I am not sure where, but this is published in the documentation.
>Prior to version 9 PL/SQL and SQL do not share the same parser so new
>SQL is not always available from within PL/SQL.
>
>Use a decode instead.
>
>HTH -- Mark D Powell --
Received on Wed Jul 31 2002 - 08:46:40 CDT

Original text of this message

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