Skip to Main Content

Oracle Database Free

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!

JSON convenience syntax requires FROM clause in subquery

Lukas EderApr 5 2023

I'm using: https://hub.docker.com/r/gvenzl/oracle-free

This syntax works:

select json_array(select 1)

But this doesn't:

select json [ select 1 ] 

It fails with:

SQL Error [923] [42000]: ORA-00923: FROM keyword not found where expected

The workaround is to add FROM dual again in the subquery:

select json [ select 1 from dual ] 

I'd say this is a bug?

This post has been answered by Loïc Lefèvre-Oracle on Apr 5 2023
Jump to Answer
Comments
Post Details
Added on Apr 5 2023
2 comments
369 views