Beautifier is adding blank lines

jking

Member²
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:
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
 
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.
 
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:
INSERT INTO my_table
  WITH qry AS
   (SELECT *
      FROM dual),
  t AS
   (SELECT *
      FROM qry)
  SELECT t.*
    FROM t;

 
Last edited:
Back
Top