Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Parser can not parse the correct code:{ select case ... end case from ... } Problem with parsing?

2907631Dec 18 2018 — edited Dec 19 2018

The code below is compiled and executed in Oracle Database 18c (18.3), but the parser cannot parse it.

I guess this is somehow related to the difference between a CASE statement (END CASE) and an CASE expression (END). The latter implies the use of END only.

In any case, the PL/SQL compiler resolves this collision adequately, but the parser does not. Is this some kind of problem with parsing?

select case

     when c.char\_length = 0 then

      c.data\_length

     else

      c.char\_length

   end case

from dba_tab_columns c

where c.table_name = 'V_$PARAMETER'

and c.column_name = 'VALUE'

parser_syntax_error_2.png

This post has been answered by thatJeffSmith-Oracle on Dec 19 2018
Jump to Answer
Comments
Post Details
Added on Dec 18 2018
7 comments
723 views