My Oracle Support Banner

ORA-00904: invalid identifier when using json_object(*) (Doc ID 2668941.1)

Last updated on APRIL 17, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 19.6.0.0.0 and later
Information in this document applies to any platform.

Symptoms

On : 19.6.0.0.0 version, XML Database

When trying to collect JSON from a table.
the following error occurs.

declare l_js varchar2(4000);
  l_bind number := 1;
begin
  with v_view as (
    select 1 n, 'a' v, sysdate d from dual)
  select json_arrayagg(json_object(*)) into l_js
    from v_view
   where n = l_bind;
  dbms_output.put_line(l_js);
end;
/

fails with ORA-00904: "L_BIND": invalid identifier

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.