Comments
5 comments
-
Hi @TampaCraig
Thanks for reaching out to us regarding this.
Yes, it is possible to specify a specific formatting style file, as described here: https://documentation.red-gate.com/sp/features-available-only-in-sql-toolbelt-essentials-and-sql-toolbelt/bulk-operations/bulk-operations-via-the-command-line#:~:text=--,-style,--s
-
Thanks, @Dan_J, that's a useful feature for using the command-line, but my question has to do with the ability to embed a comment in the SQL itself that would direct SQL Prompt to use a specific style when formatting this file from within SSMS. Something like:
--SQL Prompt Formatting On Style="Craig - Wide"
-
Hi @TampaCraig,
My apology for the delay in replying to you on this!
I'm going to run this by our development team today and come back to you on this. -
Hi there @TampaCraig,
I've spoken with our development team about this, as I suspected we are not aware of there being anything that enables you to chose a formatting style using a comment.
I appreciate this would be useful functionality for you and encourage you to log a feature request for this on our User Voice page for SQL Prompt: https://redgate.uservoice.com/forums/94413-sql-prompt
-
Thanks for looking into this further Dan!
Add comment
Please sign in to leave a comment.
I know how to use and
to tell SQL Prompt to stop and start formatting code, but I was wondering if there was perhaps a way to use a comment to indicate that I want SQL prompt to use a specific formatting style to be used for a file or block of code.
this would be useful if you have different clients with different styles or if you have specific SQL scripts that need longer line-wrap values than others and you'd like to just set this in the file's comments and not have to remember to manually switch between active Styles every time.
If this is not currently available, it would be a great, possibly easy to implement, feature to add.