semi colon placed on new line
Place semi-colon on new line.
I frequently format my statements as I'm developing them, but multiple times now I've started to add an Order By or some other clause after the auto-inserted semi-colon. I would like to see an option to place the semicolon on the line following the sql statement rather than directly after. This would enable me to start typing at the start of the next line without having to check if a semicolon had been added to the preceding line.
Example:
Select * From Table
Where A = 1; -- Semicolon added by formatting
Order By A
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!
-
Thomas Franz commented
I'ts nice, that you have done this, but I need an option to place it on the new line, except it is a single-line-statement.
Something like this looks ridiculus and bloats the code (same for SET / PRINT / IF x=y RETURN-Statements):
DECLARE @sql NVARCHAR(MAX) = 'hello'
;
DECLARE @cmd NVARCHAR(MAX) = 'nice'
;
DECLARE @xyz NVARCHAR(MAX) = 'world'
;