Skip to Main Content

SQL & PL/SQL

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!

Nested Selects SQL

2924915Apr 16 2020 — edited Apr 16 2020

The following SQL structure is eliciting an error on unbalanced parenthesis that is not the case according to Toad and my editor.  This construct was migrated from SAP IQ.  If there is a simple resolution it will prevent a rewrite of a very complex query as evidenced by the nesting of the selects.

Select  1 as depth, L2.name

from (Select 2 as depth, L3.name

      from (Select 3 as depth, L4.name

            from (Select 4 as depth, 'walt' as name

                  from sys.dual

                  where 1=1

                  ) as L4

              ) as L3

        ) as L2

where 1 = 1

;

Error at line 7

ORA-00907: missing right parenthesis

This post has been answered by jaramill on Apr 16 2020
Jump to Answer
Comments
Post Details
Added on Apr 16 2020
7 comments
823 views