Skip to Main Content

Oracle Database Discussions

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

connect by with inline view giving wrong result after upgrade from 12.1 to 19c

John NagtzaamMar 23 2023

Since the upgrade a few days ago we are facing an issue with hierarchical queries that use an inline view. The only way we have been able to fix this, is by adding the hint NO_QUERY_TRANSFORMATION. Has some of you experienced the same and found another workaround?

SR is under investigation with Oracle Support.

SELECT CASE
         WHEN
           sel_tab.smn_bey_number IN (
             SELECT DISTINCT child_code
               FROM (
               SELECT tne.child_code, tne.parent_code
                 FROM chtree_nodes    tne
                WHERE tne.tre_name      =  'GROUP_LEGAL'
                  AND sel_tab.prd_id BETWEEN tne.start_prd_id AND nvl(tne.end_prd_id, sel_tab.prd_id)
             ) tree
             CONNECT BY
               PRIOR tree.child_code = tree.parent_code
           )
         THEN
           'Y'
         ELSE
           'N'
       END calculated
  FROM (
  SELECT mre.*
    FROM report_lines mre
   WHERE mre.lse_hly_rel_id = '9700'
     AND mre.mne_code2 IS NOT NULL
) sel_tab;

Comments

Processing

Post Details

Added on Mar 23 2023
3 comments
217 views