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 IS JSON Condition With a Column Alias

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

column j format a20
with
   t (j) as (values
      (json('["a", "b"]')),            -- JSON array
      (json('{"a": "a", "b": "b"}')),  -- JSON object without id property
      (json('{"id": 42}')),            -- JSON object with numeric id property
      (json('{"id": "42"}'))           -- JSON object with string id property
   )
select j,
       j is json validate '
          {
             "type": "object",
             "properties": {
                "id": { "type": "number" }
             }
          }' as is_valid
  from t;

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 14 2024
1 comment
116 views