184 results found
-
Use formatter to create table of contents
It would be great to be able to use the formatter to create an automated table of contents based on some recognized commented pattern. For example, I could begin each section of code with:
--******
-- Title of section
--******Then after using the formatter it would see the commented section and add the line number for each section in the beginning of the script. I imagine something similar to MS Word's auto generated table of contents.
1 vote -
"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 -
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 -
Multi Line Comment shortcut
Add /* / multi line comment shortcut for highlighted code in text editor. See SSMSBoost pro for example CTRL+.
2 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 -
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 -
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 -
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 -
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 -
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 -
Merge Command Formatting
Merge Command Formatting
For MERGE commands there is no way to make the conditional requirements with 'ON' follow the same style as JOIN's ON. I noticed back on 5/17/2017 there was a closed 'Merge command formatting options' through the User Voice, stating that an experimental feature was available for SQL Prompt 7.4. What happened? In my 10.1.7.15015, within the formatting styles, there is no area for MERGE like there is for JOIN.
9 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 -
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 -
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 -
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 -
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 -
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 -
Place space before END when collapsing shorter case statements
When collapsing CASE expressions shorter then XXX, the END has no space if there is a preceding parenthesis.
Example1 = CASE t1.Col004 WHEN 1 THEN t1.Col006 END,
Example1 = CASE t1.Col004 WHEN 1 THEN TRY_CONVERT(int, t1.Col006)END4 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?