Toad World® Forums

Possible bug in code formatter


#1

select sysdate from (dual)

Error occurs:
23:36:14 Formatter Plus v4.8.7
23:36:14 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
23:36:14 UNRECOGNIZED CONSTRUCT OR SYNTAX ERROR at LINE 3, COL 13, OFFSET 28 :
23:36:14 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
23:36:14 SELECT SYSDATE
23:36:14 FROM (DUAL)
23:36:14 ------------^-------------------------------------
23:36:14 (S41) Expecting: . @ AS CROSS FULL identifier INNER JOIN
23:36:14 LEFT NATURAL PARTITION RIGHT SAMPLE SUBPARTITION VERSIONS
23:36:14 --------------------------------------------------
23:36:14 ^-------------------------------------------------
23:36:14 (S41) Expecting: . @ AS CROSS FULL identifier INNER JOIN
23:36:14 LEFT NATURAL PARTITION RIGHT SAMPLE SUBPARTITION VERSIONS
23:36:14 --------------------------------------------------

Try format by formatter tools this correct statement:


I use i my project code generator, which gives objects in the parenthesis (tables, views, select statements). Sometimes I have very large statements, (over 100KB), then i use Formatter to see and debug generated statement.Looking for unneeded parenthesis is difficult, so thads why i posted this issue.
Check this…
Regards Piter


#2

Formatter in TOAD 8.6.1 works the same… means error occurs…


#3

Thanks, Piortek. We will pass this issue to Formatter developers to include this syntax into their code.