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!

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.

SQL Developer Format SQL Text : format CASE, format Analytic Function

meravkeNov 20 2023 — edited Nov 20 2023

I would like to change SQL Developer “Format” rules (F7). specifically, I would like:

  1. a CASE to start in a new line
  2. all CASE clause to appear in one line (ie , from CASE till END and its alias- all to appear in one line)
  3. and the same for analytic function (i.e analytic function, such as row_number, would start on a new line, and all of it will appear in one line)

Any idea how to do it?

for example:

SELECT empno, CASE WHEN deptno = 1 THEN 1 ELSE NULL END AS case_, ROW_NUMBER() OVER(PARTITION BY deptno ORDER BY empno DESC)AS rn from emp;

Now I get:

Here is the Advance Setting I now use:

Comments
Post Details
Added on Nov 20 2023
4 comments
627 views