Comments are formatted wrong
torsten.strauss
Posts: 271 Silver 3
Comments are formatted wrong
SQL Prompt 7.3.0.437 will format the following
like this: (too many empty lines added with Whitespace / Preserve existing new lines between statements)
or like this: (no empty lines added with Whitespace / empty lines between statements 1)
In both cases the format is wrong.
Should look like
Thanks!
SQL Prompt 7.3.0.437 will format the following
/******************************************************************************* troubleshooting queries - query_hash and query_plan_hash ********************************************************************************/ /* query_hash Binary hash value calculated on the query and used to identify queries with similar logic. You can use the query hash to determine the aggregate resource usage for queries that differ only by literal values. */
like this: (too many empty lines added with Whitespace / Preserve existing new lines between statements)
/******************************************************************************* troubleshooting queries - query_hash and query_plan_hash ********************************************************************************/ --too many line here --too many line here --too many line here --too many line here --too many line here /* query_hash Binary hash value calculated on the query and used to identify queries with similar logic. You can use the query hash to determine the aggregate resource usage for queries that differ only by literal values. */
or like this: (no empty lines added with Whitespace / empty lines between statements 1)
/******************************************************************************* troubleshooting queries - query_hash and query_plan_hash ********************************************************************************/ --missing a line before /* query_hash Binary hash value calculated on the query and used to identify queries with similar logic. You can use the query hash to determine the aggregate resource usage for queries that differ only by literal values. */
In both cases the format is wrong.
Should look like
/******************************************************************************* troubleshooting queries - query_hash and query_plan_hash ********************************************************************************/ --one line here as configured /* query_hash Binary hash value calculated on the query and used to identify queries with similar logic. You can use the query hash to determine the aggregate resource usage for queries that differ only by literal values. */
Thanks!
Comments
Thanks for you post - We've been able to reproduce it and think we have a fix in the latest beta build (7.3.0.450). Please give it a try and let us know if it works as you'd expect.
Thanks!
Aaron.
I would like to preserve the lines between the comments but would like to apply the formatting rules on the statement.
This is the outcome:
Thanks for your support!
Just to clarify, are you saying that you have Preserve empty lines between statements turned off, but you'd like to still preserve empty lines between comments?
Best regards,
David
the lines between the comments were deleted which is wrong.
Between the SQL statements the added line is correct.
Seems that the formatting rules will be handled differently between comments and SQL code which is not my expectation....
I've found what was causing this and improved the logic, so we'll include this in the next release. Hopefully this will solve your problem.
Best regards,
David