Print Thread
Beautifier Corrections
#38105 05/26/10 03:03 PM
Joined: Mar 2009
Posts: 32
M
mamv Offline OP
Member
OP Offline
Member
M
Joined: Mar 2009
Posts: 32
Hi,

Bellow I will show examples of the 3 most anoying (at least for me grin) bugs in sql beautifier I encouter almost in everyday usage. I had them stated on the beta forum, but since it was deleted I feel its my dutty to post them again.

Really hope you guys can fix this. Keep up the exellent work.

NOT EXISTS:

How it looks after beautifier:
SQL Query
SELECT *
  FROM services
 WHERE NOT EXISTS (SELECT NULL
          FROM ex_services);


How it should look:
SQL Query
SELECT *
  FROM services
 WHERE NOT EXISTS (SELECT NULL
                     FROM ex_services);
 


Comments in IF Statments:

How it looks after beautifier:
Code
BEGIN
  -- comment
  IF 1 = 1 THEN
    -- comment
    NULL;
    -- comment
  ELSIF 2 = 2 THEN
    -- comment
    NULL;
    -- comment
  ELSE
    -- comment
    NULL;
  END IF;
END;


How it should look:

Code
BEGIN
  -- comment
  IF 1 = 1 THEN
    -- comment
    NULL;
  -- comment
  ELSIF 2 = 2 THEN
    -- comment
    NULL;
  -- comment
  ELSE
    -- comment
    NULL;
  END IF;
END;


Hints on Select Statements:

How it looks after beautifier:
SQL Query
SELECT /*+ FIRST_ROWS */
 serviceid,
 name,
 service2servicetype
  FROM service
 WHERE service2servicetype = 1950000042;


How it should look:
SQL Query
SELECT /*+ FIRST_ROWS */
       serviceid,
       name,
       service2servicetype
  FROM service
 WHERE service2servicetype = 1950000042;
 


Kind Regards,
Manuel Vidigal

Re: Beautifier Corrections
mamv #38110 05/27/10 09:44 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
Thanks for your feedback, we'll check it out.


Marco Kalter
Allround Automations
Re: Beautifier Corrections
Marco Kalter #38135 06/01/10 02:01 AM
Joined: Oct 2002
Posts: 59
Quebec,Canada
D
Member
Offline
Member
D
Joined: Oct 2002
Posts: 59
Quebec,Canada
Hi,

I really like the proposed formatting.

Serge


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.034s Queries: 15 (0.012s) Memory: 2.5076 MB (Peak: 3.0394 MB) Data Comp: Off Server Time: 2024-05-21 00:02:01 UTC
Valid HTML 5 and Valid CSS