_This is a _shadow issue* for Issue 59 on Google Code (from which this project was moved).
Added 2012-02-26T22:47:11.000Z by email@example.com.
Labels: Type-Defect, Priority-Medium, Formatter, Parser.
Please make updates to the bug there.*
On the online parser comments are removed ok but c-style comments are
and single line -- comments cause problems especially with long varaiables.
e.g. using the online parser.
/* c-style comment */
-- another comment
join bar on val1 = val2 where id = 123;
is parsed with the comments serial in the query. For the
-- syntax this will break the SQL. It would be better IMHO
to parse the comments as separate lines breaking at 80chars.
Also the long varaiable causes alignment problems when combined
with a comment.
see below. This is not rendered properly due to line wrapping see
the Web interface. The sqlformat command gives a similar result.
SELECT * foo, bar, /* c-style comment */ rtrim(substring(mfy.filename,charindex('w2',mfy.filename,-1),32)) AS yfilename,
foo /* this
FROM foo -- another comment
JOIN bar ON val1 = val2
WHERE id = 123;
Fixed in e4bccf4