Support a common intending option for SELECT
Sample query (spaces marked with underscores):
SELECTstaffId, staffName, a
FROM__personnel
SELECT and FROM have whitespace after them to align the rest of the statement. This formatting style is tedious to maintain and almost nowhere to be found in real codebases or on the web. Please support the more common code style:
SELECTstaffId, staffName, a
FROMpersonnel
Just one space.
This feature is now included in the new SQL Prompt 8.0. For additional information see: http://documentation.red-gate.com/display/SP8/SQL+Prompt+8.0+release+notes
You can get the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for your help!
-
Richard commented
A-ha! Thanks to the original poster for explaining this bizarre behaviour by SQL Prompt. I had absolutely *no*idea* why SQL prompt was inserting an extra space between the words "SELECT" and "SCOPE_IDENTITY()", and I now understand why. It's still completely stupid, and I'm annoyed that I have no way of switching it off in the formatting style. Similarly, it makes no sense why an extra space is inserted between the two words in "INSERT INTO". @RedGate: Please fix this... (also please rename this suggestion, as the title has a spelling mistake which will prevent it being found: 'intending' should be 'indenting')
-
Piotr L commented
My preference is always to right-align keywords and left-align data elements like in this example: http://www.sqlstyle.guide/#white-space
It is just more readable.
-
Richter commented
The aligned style is really impractical to maintain. It is ugly to have parts of the code base aligned, other parts not. Why can't this be turned off?!