My Oracle Support Banner

"ORA-00904: invalid identifier" Error when Using Subqueries in JPQL Query (Doc ID 1599956.1)

Last updated on MAY 08, 2023

Applies to:

Oracle TopLink - Version 12.1.1.0 to 12.1.1.0 [Release 12c]
Information in this document applies to any platform.

Symptoms

A JPQL query consists of multiple subqueries which refer to same join in parent statement :

The issue is that the second sub-query uses a join from the source query (t2.ID = t4.ID)  that was used in the first sub-query.

As a consequence,  this query fails with the following error :
ORA-00904- Error : java.sql.SQLSyntaxErrorException: ORA-00904: 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.