78 results found
-
Implement Collapsable Regions
Developing a script of some size becomes very tedious when going back and forth, and the script quickly becomes unwieldy.
Add collapsable regions driven by specially formatted comment (--#Region [name/description/comment] ... --#EndRegion, or some other suitable notation).
70 votesWe’ve had a look at this feature and found a potential existing solution using
BEGIN END blocks in SSMS 2016+e.g.
BEGIN —this is a “region”
SELECT * FROM TEST;END
We’re not planning to do this in the near future because of the effort required to support all versions of VS and SSMS that Prompt is available on.
Kind Regards,
Prompt Team -
Option to add WITH (NOLOCK)
I would like SQL Prompt to be able to insert WITH (NOLOCK) when writing SELECT and JOIN statements. When working with production data, the risk of forgetting to write this chunk and locking data rows is very high.
57 votesThanks for all the feedback here.
After review, the team have decided to decline this specific suggestion. But, we’ll take forward Kendra’s code analysis suggestion in the comments below.
-
Format MDX
It would be great to format MDX queries
48 votesAfter reviewing this suggestion the team don’t feel this will be high enough on our priority list to keep open.
MDX Studio looks like the answer for anybody looking for an editor.
-
Allow Format SQL to execute even when there are errors
If I'm halfway through writing a query and I want SQL prompt to format it in order to make it easier to finish what I'm doing, SQL prompt currently will fail because the query's not syntactically correct.
What I'd like is an option where I can tell SQL prompt I don't care if the queries I'm formatting are incorrect, just do your best with it and ignore any errors.
44 votesUnfortunately the way SQL Prompt parses SQL code currently does not allow for formatting when there are errors in the code.
Changing this would be a very large project because extensive changes to the parser would be required.
We are not planning on doing this at this time.
Thanks for your suggestion,
The Prompt Team -
Features from SSMS ToolsPack
There is a tool called SSMS ToolsPack (http://www.ssmstoolspack.com) which contains a number of useful tools, such as color-coding windows (which is now an experimental feature in SQLPrompt, but the other set allows you to choose your colors). One of the tools I use with unfortunate frequency (and has saved my bacon numerous times) is their "Query Execution History" feature; this saves every single query you execute with connection information, date/time stamp, and what file name it was executed from. If you've ever had to go "What was that ad-hoc query I wrote but didn't save?" this feature can…
39 votesThanks for your suggestions.
If there are specific features you would like to see added to Prompt, could you please raise individual requests for them? For instance, here is one for “Query Execution History”:
https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/3477515-query-execution-history
Thanks,
The Prompt Team
-
Don't suggest join keys I've already used
After I type
SELECT * FROM sys.indexes i
INNER JOIN sys.partitions p
ON i.indexid = p.indexid
ANDthe IntelliSense still suggests me i.indexid = p.indexid which I've already used. These duplicates can become pretty annoying when multiple columns are used for joining
26 votesThank you for your suggestion.
We’ve reviewed this as part of our UserVoice triage.
Currently, we have no plans to implement this feature in the near future. However, if there is sufficient demand in the future, we will revisit it.
Please feel free to send us any additional feedback on these topics by commenting here.
Kind Regards,
The Prompt Team -
Format CTEs to keep the semicolon on the same line as the "With"
When you format:
SELECT x from y
;WITH NumberSequence ( MonthNumber )
AS ( SELECT 1 AS MonthNumber
UNION ALL
SELECT MonthNumber + 1
FROM NumberSequence
WHERE MonthNumber < 12
)You move the semicolon to the end of the previous command instead of leaving it with the CTE and remove the blank line:
SELECT x from y;
WITH NumberSequence ( MonthNumber )
AS ( SELECT 1 AS MonthNumber
UNION ALL
SELECT MonthNumber + 1
FROM NumberSequence
WHERE MonthNumber < 12
)Should leave the blank line and semicolon where they are.
Thanks,
Tom
20 votesThank you for your suggestion.
We’ve reviewed this as part of our UserVoice triage.
We’ve decided not to implement this feature as there is not enough evidence/demand at this point in time to justify its implementation.
Kind Regards,
The Prompt Team -
Intellisense improvement : Write the FROM automatically for the user based on the SELECT
The idea is that we don't have to go back with the cursor and can always type forwards, not interrupting our flow/thinking
For Example,
User types:
SELECT Master.Active,Prompt now makes it
SELECT m.Active -- Cursor stays here
FROM Master mWe still start with the SELECT but mention the table which is an indication to Prompt to wrote the FROM automatically after that.
Now we start with the from and go back to the select which is cumbersome if you have to do it 100 times a day.
This feature is also more natural to find because the developer…
19 votesThank you for your suggestion.
We’ve reviewed this as part of our UserVoice triage.
Currently, we have no plans to implement this feature in the near future. However, if there is sufficient demand in the future, we will revisit it.
Please feel free to send us any additional feedback on these topics by commenting here.
Kind Regards,
The Prompt Team -
Need for automatic "where" concatenation
When you are working with SQL it is easy to forget the "where" statement in update, delete. If this happens in production it could be devastating. It would be a nice feature to automatic add the "where" statement in for "delete" and/or "update".
19 votesThank you for the suggestion.
Prompt already provides execution warnings when you use an UPDATE or DELETE statement without a WHERE clause and code analysis also flags this as an issue. Please see the comments below for other options for solving this issue.
You can get the latest version of SQL Prompt, including all of the above, from http://www.red-gate.com/products/sql-development/sql-prompt/.
Thank you for your help!
Kind regards,
The Prompt Team
-
Don't create alias that map to other SQL Prompt shortcuts
When writing statements like 'ssf s [tab] [enter]' to produce the statement in exhibit A based on the prompt suggestions, the alias 's' gets interpreted as another shortcut for additional keywords as seen in exhibit B. It would be nice if SQL Prompt was aware of its own shortcuts and produced some other unique alias so it didn't collide and create parser errors
--Exhibit A
SELECT * FROM config.Service AS S--Exhibit B
SELECT * FROM config.Service AS SELECT16 votesI’m going to close this request because it looks like this was only an issue when the SSMS Tools Pack was installed – the solution was to disable snippets in the tools pack. If you’re still having problems with its snippets disabled then let me know.
-
Format option for short selects to stay on one line
When a SELECT statement is short, for example fits on one line on my screen I would like for the SELECT to not be formatted onto multiple lines. This could even apply to the parts of the SELECT if the entire SELECT statement is long. For example a WHERE statement with only two short clauses could be one line.
13 votesWe’ve released a new formatting engine in SQLPrompt Version 8.
You can get the latest version of SQL Prompt from https://www.red-gate.com/products/sql-development/sql-prompt/.
If there is something missing please let us know by opening a new suggestion.
Kind regards,
The Prompt Team
-
Be able to add space between two right parentheses
When I have two right parentheses next to each other like in a query like this (in the OPTION clause)
SELECT Columns
FROM TableA
INNER JOIN TableB
ON TableA.Key = TableB.Key
OPTION( USE HINT( N'FORCEDEFAULTCARDINALITY_ESTIMATION' ) )There doesn't appear to be an option to have the space between the two right parentheses at the end. I have tried checking/unchecking quite a few boxes in the formatting style editor, and I don't think anything is controlling this. To me, the "add spaces around parentheses contents" option should put a space between the two right parentheses, but it doesn't.
12 votesHi Jake,
Thanks for reporting this. The team have reviewed the suggestion and we think it’s a bug rather than a feature suggestion.
If you’d like to submit this as a ticket into our support team we’ll pick it up from there and action.
-
Allow starting with FROM clause first to make intellisense and query building more natural
Allow starting a query with the FROM clause (ala LINQ) and provide intellisense normally. I would continue normally, right up to the point the user types the select update or delete keywords, at which point you either automagically reposition the keword and cursor to the top of the query, or allow the user to finish and then prompt for query restructuring. This would completely do away with the mucking around of doing a ssf and then going back later to fill in the list! In fact, I'd take it a step further and offer to restructure poorly written queries..e.g., If…
8 votesThank you for your suggestion.
Ideally, we’d love to respond individually to every request, but currently we can’t due to the volume of unanswered tickets. We’re clearing up our UserVoice backlog to make it easier for us as a small team to prioritize the most valuable features moving forward. Therefore, due to a lack of recent interest in this ticket, we have decided to close it.
If you feel strongly about it, we encourage you to create a new request.
Thanks,
The Prompt Team
-
Encapsulate the current statement in table valued function
It could be useful to wrap the result of a select statement into a table valued function (inline or multistatement)
8 votesThank you for your suggestion.
Ideally, we’d love to respond individually to every request, but currently we can’t due to the volume of unanswered tickets. We’re clearing up our UserVoice backlog to make it easier for us as a small team to prioritize the most valuable features moving forward. Therefore, due to a lack of recent interest in this ticket, we have decided to close it.
If you feel strongly about it, we encourage you to create a new request.
Thanks,
The Prompt Team
-
Code Analysis: Option to only enable for files, not for adhoc queries
Sometimes we do things in adhoc queries that would violate Code Analysis rules, or we just do not want to make the effort to confirm to all the rules. Of course you can toggle Code Analysis with Ctrl+Shift+A, but it would be easier (and make it impossible to forget to switch it back on for "real code") if SQLPrompt had a setting of which the effect would be that Code Analysis only was enabled for query windows that were using a physical file, and not for ahoc queries that are not saved to a file.
7 votesThank you for your suggestion.
We’ve reviewed this as part of our UserVoice triage.
Currently, we have no plans to implement this feature in the near future.
Please feel free to request any additional features related to code analysis or Prompt in general by creating new suggestions.
Kind Regards,
The Prompt Team -
compare
It would be nice to compare 2 objects (tables / stored proc ets), by right clicking on them and select to compare (lig scema compare).
I am using to to clean up an old DB with a lot of copyed code and tables.
7 votesThank you for your suggestion.
Ideally, we’d love to respond individually to every request, but currently we can’t due to the volume of unanswered tickets. We’re clearing up our UserVoice backlog to make it easier for us as a small team to prioritize the most valuable features moving forward. Therefore, due to a lack of recent interest in this ticket, we have decided to close it.
If you feel strongly about it, we encourage you to create a new request.
Thanks,
The Prompt Team
-
Make snippets follow case formatting
I have my (personal preference) format case set to lowercase for reserved keywords, built-in functions and built-in data types. When I use snippets however, the case remains the same as the snippet was original setup - would be nice if the snippets followed the same rules as the auto-complete
7 votesThank you for your suggestion.
Ideally, we’d love to respond individually to every request, but currently we can’t due to the volume of unanswered tickets. We’re clearing up our UserVoice backlog to make it easier for us as a small team to prioritize the most valuable features moving forward. Therefore, due to a lack of recent interest in this ticket, we have decided to close it.
If you feel strongly about it, we encourage you to create a new request.
Thanks,
The Prompt Team
-
Please remove warning for WITH (NOLOCK)
When writing a report query using WITH (NOLOCK) a warning is produced saying "TABLE HINT is used"
It would be great to be able to configure that warning and turn it off.6 votesThank you for your suggestion.
We’ve reviewed this as part of our UserVoice triage.
If you’d like, you can turn off the table hint code analysis rule in the rule manager, but currently, we have no plans to allow the configuration of specific rules.
Using WITH (NOLOCK) is no longer recommended. Instead of doing NOLOCK in each query it’s better to use “Read commited snapshot” syntax. It provides you with consistent data, which while not always up-to-date means you avoid issues like duplication of data or missing data (non deterministic dirty reads). Please see the link below for more information.
https://sqlperformance.com/2014/05/t-sql-queries/read-committed-snapshot-isolation
Kind Regards,
The Prompt Team -
Auto Generate Script for Update
When Typing
UPDATE MyTable and then press TAB
it would be nice when SQL Prompt would generate
UPDATE MyTabLE SEt
MyField1 = @MyField1,
MyField2 = @MyField 2
etc6 votesSQL Prompt has support for auto-completing INSERT statements which as of version 9.3, can be automatically refactored into an UPDATE statement, which should achieve a similar result to what has been requested.
Kind Regards,
The Prompt Team
-
Remove redundant parentheses
I sometimes get code that looks like this:
WHERE (a = b) AND (c = d) AND (e = f)Or even like this:
WHERE (((a = b) AND (c = d)) AND (e = f))It would be great if SQL Prompt would have an option to remove all the redundant parentheses and reduce this to
WHERE a = b AND c = d AND e = fOf course it would have to be smart enough to not remove parentheses that are needed when mixing AND and OR. So if I submit this code:
WHERE ((a = b)…5 votesThank you for your suggestion.
We’ve reviewed this as part of our UserVoice triage.
Currently, we have no plans to implement this feature in the near future.
Kind Regards,
The Prompt Team
- Don't see your idea?