Skip to Main Content

SQL Developer

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!

SQL Developer Formatting Question

Orcl ApexSep 14 2017 — edited Sep 25 2017

Hi Everyone,

I have below sql statement and even after correcting the formatting options it's not format well.

Line 3 I have manually formatted, but actual formatting done by developer is like from line 4 - 10.

Also Group By is required in line 12 but developer format put it in at line 12.

Please suggest how to fix it, also how to remove line number from sql developer (I have manually mentioned here for question but when I copy paste code from web i have to remove line numbers manually).

1 SELECT host

2       ,   COUNT(*) my_count

3       ,  SUM( COUNT(*)  ) OVER( ORDER BY host ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) AS cum_count

4       ,   SUM(

5            COUNT(*)

6        ) OVER(

7            ORDER BY

8                host

9            ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING

10        ) AS tot_count

11   FROM apache_log GROUP BY

12        host

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2017
Added on Sep 14 2017
10 comments
1,097 views