Error after upgrading to 19C - Connect By Required
We recently upgraded from Oracle 12c Enterprise Edition Release 12.1.0.2.0 to Oracle Database 19c Enterprise Edition Release 19.0.0.0.0
We have a complex large dynamic SQL created in a Java that works perfectly in Oracle 12, but now gives the following error in Oracle 19.
ORA-01788: CONNECT BY clause required in this query block
We tried setting the system parameter _allow_level_without_connect_by to TRUE, but this did not help.
Can you please review this query and give me a possible correction?
/*
Oracle Database 11.2 introduced another method for accessing trees: recursive subquery factoring. Aka recursive with.
This is the ANSI compliant way to build hierarchies in SQL. It's composed of two queries. A base query and a recursive one.