Print Thread
Beautifier is adding blank lines
#53219 03/01/16 03:07 PM
Joined: Jun 2004
Posts: 89
J
jking Offline OP
Member
OP Offline
Member
J
Joined: Jun 2004
Posts: 89
I have a procedure that has a complicated "insert" statement that uses a "with" statement. Whenever I run the beautifier, a blank line is being inserted after the "insert" statement.

SQL Query
begin
  insert into my_table
    select t.*
      from (with qry as (select *
                           from dual)
             select *
               from qry) t;





  -- All blank lines above were added by the beautifier.
  commit;
end;

PSD v11 x64

Thanks,
Joe

Re: Beautifier is adding blank lines
jking #53228 03/02/16 09:29 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
That's not right. We'll fix it.


Marco Kalter
Allround Automations
Re: Beautifier is adding blank lines
Marco Kalter #53244 03/04/16 01:45 PM
Joined: Feb 2007
Posts: 134
Bulgaria
Member
Offline
Member
Joined: Feb 2007
Posts: 134
Bulgaria
And the 32-bit version adds up to 2 lines.
You can test by deleting all empty lines from the example above and then beautify 2 or more times.

Re: Beautifier is adding blank lines
braykov #53588 06/07/16 04:32 PM
Joined: May 2012
Posts: 32
K
Member
Offline
Member
K
Joined: May 2012
Posts: 32
The beautifier doesn't like a sub-query that contains a WITH statement. You can always add another query to the WITH instead of using a sub-query.

SQL Query
INSERT INTO my_table
  WITH qry AS
   (SELECT *
      FROM dual),
  t AS
   (SELECT *
      FROM qry)
  SELECT t.*
    FROM t;

Last edited by Kevin Seymour; 06/07/16 04:36 PM. Reason: SQL
Re: Beautifier is adding blank lines
Kevin Seymour #60297 07/10/19 10:31 AM
Joined: Feb 2007
Posts: 134
Bulgaria
Member
Offline
Member
Joined: Feb 2007
Posts: 134
Bulgaria
Version 13, 64 bit, still adds 2 lines.


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.026s Queries: 13 (0.009s) Memory: 2.5175 MB (Peak: 3.0420 MB) Data Comp: Off Server Time: 2024-05-20 05:57:33 UTC
Valid HTML 5 and Valid CSS