Comments
3 comments
-
Hi @Mikael_H
Thanks for reaching out to us regarding this, my apology for the delay in responding to you!I may need to raise this with our development team as a feature request, but before I do so, would you mind checking if the following helps? - Looking under the Styles options, unchecking 'Insert semicolons' will stop the semicolon being added after formatting.
I hope this helps, but please don't hesitate in coming back to us again if any further assistance is required on this.
-
Hi!Unchecking the Insert semicolons action prevents the insertion of the semicolon after the first END, as well as any other missing semicolons when formatting the code.An option for specifying the behavior in this scenario would be nice, but I also understand the complexity of adding formatting options without introducing conflicting settings or other flaws.Actually, a reason for this particular formatting behavior catching my attention was that in a previous version this particular "extra" semicolon insertion was made without the full CR+LF line and that caused the source control to detect change in line endings. However, I can't reproduce that behavior now so I assume that has been corrected.Best RegardsMikael
-
Hi @Mikael_H
Thanks for your reply on this, my sincere apology for the delay in responding to you!I completely understand that unchecking Insert semicolons is not a good solution for you on this. I have had a further look through the SQL Prompt formatting options but unfortunately cannot find a way to achieve this. As a result, can I encourage you to raise this as a feature request via our User Voice system (https://redgate.uservoice.com/forums/94413-sql-prompt). Our development team will then review it alongside other submitted feature requests.
Add comment
Please sign in to leave a comment.
Default
IF @a = 1BEGIN
PRINT 'This way';
END;
ELSE
BEGIN
PRINT 'That way';
END;
Collapsed
IF @a = 1 BEGINPRINT 'This way';
END;
ELSE BEGIN
PRINT 'That way';
END;