186 results found
-
SQL Prompt Support for Azure Synapse (Azure SQL Data Warehouse)
Please add support for
SQL Prompt Support for Azure Synapse (Azure SQL Data Warehouse)46 votes -
"Insert Semicolons" feature should add Semicolon after "BEGIN"
When using a BEGIN/END block, the "Insert Semicolons" feature adds a semicolon after "END" command, but not after the "BEGIN" command.
One reason why this should be done, is the use of the THROW statement, which requires the previous statement to be terminated with a semicolon.
Technically it is still runnable code, but, SSMS (as of version 18.8) sees it as a syntax error (see screenshot).
I don't know which is the appropriate fix...waiting for SSMS to fix the syntax error it shows (but I doubt they will since the non-use of semicolons is deprecated), or if it's appropriate for…
3 votes -
Separate ALIAS Alignment - table vs. column
Aligning based on column-alias makes for much better readability. When turned OFF, because some long-named table's alias pushes the TABLE-alias way to the right, all other table aliases follow it...into the NON-VISIBLE area (when using multiple vertical tabs).
Please SEPARATE these into TWO options:
. Align Column Aliases - on/off
. Align Table Aliases - on/offTHERE IS A BUG TO FIX HERE TOO: If a UDF is bounded by "--SQL Prompt formatting off/on" the TABLE ALIAS position REMAINS as if the UDF's alias was in it's SQL Prompt position, NOT where the excluded code has it! NASTY.
You could…
5 votes -
Separate UDF Formating from Built-in in "Function Calls"
We cannot treat UDF parameter listing/indentation in similar vein to Stored Procedure call formatting. All "Functions", be they UDF or built-in, are lumped into the same four RESTRICTIVE options on the "Function calls" page, and we have no "parentheses style" options for them.
We need:
1. Separation by type (UDF vs. Built-in).
2. Global ==> Parentheses, to apply to UDFs, by our choice.Thanks.
1 vote -
Have Formal SQL Actions be included in the formatting style file.
Have Formal SQL Actions be included in the formatting style file. This way when a team shared a standard we do not have to share the file and screen shots of the Options menu to manually sync to maintain team consistency on code checkin.
2 votes -
Add quotes and commas function with commas before
Please can the "Add quotes and commas" action conform to the current active style's Commas setting?
So if the setting is "Place commas before items", then the action should also place the commas before.
At the moment, I have to run a Format SQL action after using Add quotes and commas, which is cumbersome.
1 vote -
Make the "Enclose identifiers within square brackets [ ]" option persist
Currently in Visual Studio the option to "Enclose identifiers within square brackets []" option will be set to true on startup requiring a user to turn it off every time they load Visual Studio.
This option when set to false should remain that way even after a restart of Visual Studio the same way it does in SSMS.
2 votes -
Aliases Postfixes to ignore
Similar to the "Prefixes to ignore" option in Options > Inserted code > Aliases, could we have a "Postfixes to ignore" option to allow use to set words at the end of a tablename to ignore when generating aliases.
Currently I have to keep the custom aliases list up to date, whereas this would do that automatically.
2 votes -
Multi Line Comment shortcut
Add /* / multi line comment shortcut for highlighted code in text editor. See SSMSBoost pro for example CTRL+.
2 votes -
Fix closing quote for 'N' strings
When typing a string preceded with 'N' (like N'string value'), when you type the closing quote it gets doubled. Hard to explain, but easy to reproduce. Just type these two statements into SSMS to see the difference:
SELECT 'Bill' As FirstName
SELECT N'Bill' As FirstName1 vote -
Option / Action to remove square brackets from types
I prefer types without square brackets ( INT vs [INT], for example).
If using square brackets for identifiers in the format options, there is no quick way to remove these.
My work-around is -
1. Apply Format Style option "Add/remove brackets + Remove Unnecessary brackets"
2. Format the block of code
3. Apply format Style option "Add/remove brackets + Add brackets to all identifiers"
4. Format the block of code
5. restore format Style option to original choiceIt would be nice to have a single action to do this, or to have a separate option in format styles to…
3 votes -
Replace all inline comments with block comments
It would be really useful to be able to choose the default comment style as either inline -- or comment block /* */, and have that style be applied when executing an auto-format on the script.
See https://www.erikdarlingdata.com/sql-server/please-use-block-quotes-for-code-comments-in-your-t-sql/ for more info
17 votes -
Option to Omit Formatting of Comments
Option (such as a check box) to omit active style formatting of comment lines between /* and */. Similar to SQL Prompt formatting off/on without the added code lines.
2 votes -
Add option to choose Single/Multi-line script for INSERT and EXECUTE statements
Currently SQL Prompt inserts SQL full INSERT script or EXEC SP in multiline while it might be useful for INSERT statement, but most of the times I have to realign them into a single line. It would be good if we have the option to choose wheather to add statement in single line or multi line? and its more usefull if we have shortcut to switch the inserted statement between formats?
2 votes -
Copy as IN clause - Allow second column as ID comment
So… Copy as IN Clause. Love it, but let’s improve it. Let’s say we have the following output…
ProductID ProductDesc
1 SQL Prompt
2 SQL Search
3 SQL CompareIf we use Copy as IN Clause on the ProductID column, we get:
IN
(
1,
2,
3
)Which super…. However those IDs mean nothing to me in 6 months time when I’m now having to modify my code. What would be awesome, is if I can select both ProductID and ProductDesc, then hit Copy as IN Clause, and get the following output:
IN
(
1, -- SQL Prompt
2,…5 votes -
Use SQL Prompt editing settings in other tools (like MultiScript)
When I am composing a script in Multi-Script, I'd like to have the editing settings available. Include variable/column name completion, keyword formatting, indention, etc..
2 votes -
Begin statement is not starting on a new line within an If statement. Please allow this in format styles. The option is there but it doesn't
When Place Begin - End statements on new line is selected it doesn't appear to work as part of an If statement. This makes the begin and end difficult to find
2 votes -
Custom Formatting and Refactoring (API)
I would like to expand upon suggestions others have made regarding adding custom formatting and analyzers.
I have recently been trying to implement SQL Prompt for our team, and I have struggles with a lack of customization, opinionated options that don’t reflect our needs, and some bugs.
What would have solved this issue for me would have been the ability to add custom formatters and custom analyzers.Custom Formatters
Since SQL Prompt gets the position of tokens from IAlignmentProvider.FinalAlignmentForToken I suggest that the API couple simply be plumbed into this method, if a plugin is attached it would call the…3 votes -
Convert IIF to CASE
We have code littered with IIFs that we would like to convert to CASE. Logically this is straightforward, but achieving it swiftly is proving more difficult. A regex takes care of the simple ones, but the ugly ones with nested functions across multiple lines and all sorts are proving far more difficult.
Would it be possible to add a feature to SQL Prompt to refactor IIFs into CASE statements? Thanks
2 votes -
SQL Prompt does not think PERSIST_SAMPLE_PERCENT is valid
PERSIST_SAMPLE_PERCENT is a new feature in SQL Server 2016 SP1 CU4.
SQL Prompt does not think this is a valid UPDATE STATISTICS statement:
UPDATE STATISTICS dbo.MyTable(MyStat)
WITH FULLSCAN, PERSIST_SAMPLE_PERCENT = ON;It is valid and the correct syntax. SQL Prompt should be updated to format this correctly.
3 votes
- Don't see your idea?