SQL code folding

MiroslavN

Member
Is it possible to fold SQL code including sub query?
For example this code should folded in lines:
1,2,4,8, and 10. It will help to read/write large queries.

Code:
1  SELECT
 2         (SELECT COUNT(1)
 3             FROM DUAL
 4            WHERE EXISTS (SELECT 1
 5                    FROM TABLE1 T1
 6                   WHERE T1.FIELD1 = VAR1)
 7         ) +
 8         (SELECT COUNT(1)
 9            FROM DUAL
10           WHERE EXISTS (SELECT 1
11                    FROM TABLE2 T2
12                   WHERE T2.FIELD2 = VAR2)
13         )
14   INTO RET
15   FROM DUAL;
 
Hi Marco,

I have been looking for the same feature V. 8.0.1.1522, without a trace. You should be able to implement it to the SQL Editor because it is already part of the PLSQL Editor. At least a Goto corresponding bracket would be helpful within beg SQLs.

Greeting,
Holger
 
I'd like to add my support of this request. I personally don't use PL and have no use of program windows etc.

But I do use multiple CASE WHEN's and Decodes as well as multiple part scripts.

It would be nice to be able to Fold it up in SQL window
 
Back
Top