Posted By: Todd_Emo PL/SQL Beautifier could not parse text - 06/15/09 03:26 PM

Does anyone have any tips for determining what specifically is causing the PL/SQL Beautifier to generate the following error:

"PL/SQL Beautifier could not parse text"

The code appears to be syntactically correct and creates the database view as intended in a valid state.

Thank you for your suggestions.
Can you send the code to me?
Posted By: Wim Re: PL/SQL Beautifier could not parse text - 06/17/09 11:32 AM
Code
create or replace view testview as
select a,b,c,d
  from   table1,table2
  where  table1.a = table2.d
  and    b < c
  order by a;

If you run beautifier on the above code you get the error mentioned by Todd_emo.
If you select the code from 'select' until the end of the code then beautifier does his magic without complaints. In the above case (and my custom settings) it becomes (omitting the create line):

Code
SELECT a
      ,b
      ,c
      ,d
  FROM table1
      ,table2
 WHERE table1.a = table2.d
   AND b < c
 ORDER BY a;
Posted By: petesmith Re: PL/SQL Beautifier could not parse text - 06/18/09 07:31 AM
Yes, this happens for me too, and has been painful in the past. However I don't believe this is a bug. It is a PL/SQL beautifier, not a SQL beautifier. A create or replace DDL isn't a part of PL/SQL.

I do the same as above, I highlight the SELECT part and beautify that.

It would be a nice change to have the beautifier work on SQL scripts too however I have no complaints. The beautifier is by far the best feature of PLSD.

Do we have any news on this subject? I'm not able to "beautify" my views because of this error. The last answer is not complete from my point of view because, in your website, the description of the beautifier includes both SQL and PL/SQL codes: "The PL/SQL Beautifier allows you to format your SQL and PL/SQL code through a user-defined set of rules [...]"
The PL/SQL Beautifier can only process PL/SQL, as the name suggests. This includes SQL that is valid within PL/SQL, but not DDL statements like "create view".
© Allround Automations forums