Skip to Main Content

SQL Developer for VS Code

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!

Bug: Syntax Error When Using CASE Statement With Dangling LIKE/BETWEEN Predicates

The following statement works in Oracle Database 23ai but produces a syntax error in the VS Code extension 24.3.1.

with
  function f (in_input in integer) return varchar2 is
  begin
      return case in_input
                when 1,=2,3,>19 then '1,=2,3,>19'
                when in (4, 5) then 'in (4, 5)'
                when 10, like '%2' then '10, like ''%2'''
                when < 10 then '< 10'
                when between 18 and 20 then 'between 18 and 20'
                when >= 16 then '>= 16'
                when is null then 'is null'
                else 'else'
             end;
  end;
  d as (select level as input connect by level <= 20 union all select null)
select input, f(input) from d;
/

Here's the screenshot showing the complete error message:

This post has been answered by Philipp Salvisberg on Apr 15 2025
Jump to Answer
Comments
Post Details
Added on Dec 15 2024
1 comment
136 views