Print Thread
PL/SQL Beautifier could not parse text
#34203 06/15/09 03:26 PM
Joined: Jun 2009
Posts: 2
Ohio
T
Member
OP Offline
Member
T
Joined: Jun 2009
Posts: 2
Ohio

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.

Re: PL/SQL Beautifier could not parse text
Todd_Emo #34206 06/16/09 09:24 AM
Joined: Aug 1999
Posts: 22,204
Member
Offline
Member
Joined: Aug 1999
Posts: 22,204
Can you send the code to me?


Marco Kalter
Allround Automations
Re: PL/SQL Beautifier could not parse text
Marco Kalter #34214 06/17/09 11:32 AM
Joined: Aug 2008
Posts: 60
Belgium
W
Wim Offline
Member
Offline
Member
W
Joined: Aug 2008
Posts: 60
Belgium
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;


Regards,
Wim
Re: PL/SQL Beautifier could not parse text
Wim #34221 06/18/09 07:31 AM
Joined: Sep 2008
Posts: 10
Melbourne, Australia
Member
Offline
Member
Joined: Sep 2008
Posts: 10
Melbourne, Australia
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.


Re: PL/SQL Beautifier could not parse text
petesmith #44254 07/17/12 10:30 AM
Joined: Jul 2012
Posts: 1
Y
Member
Offline
Member
Y
Joined: Jul 2012
Posts: 1
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 [...]"

Re: PL/SQL Beautifier could not parse text
Yves Sarrasin #44265 07/18/12 09:07 AM
Joined: Aug 1999
Posts: 22,204
Member
Offline
Member
Joined: Aug 1999
Posts: 22,204
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".


Marco Kalter
Allround Automations

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.090s Queries: 14 (0.041s) Memory: 2.5181 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-04-25 10:48:00 UTC
Valid HTML 5 and Valid CSS