Skip to content

SQL Prompt

Welcome to the SQL Prompt feature suggestion list. Find out more information about SQL Prompt at http://www.red-gate.com/products/sql-development/sql-prompt/.

If you have any questions, need help or have found a bug in SQL Prompt, please visit the forums or our support portal.

SQL Prompt

Categories

JUMP TO ANOTHER FORUM

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback

78 results found

  1. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    11 comments  ·  Format SQL  ·  Admin →
    declined  ·  Andrei Rusitoru responded

    We’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

  2. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    15 comments  ·  Format SQL  ·  Admin →

    Thanks 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.

  3. It would be great to format MDX queries

    48 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    5 comments  ·  Format SQL  ·  Admin →
  4. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    5 comments  ·  Format SQL  ·  Admin →
    declined  ·  Andrei Rusitoru responded

    Unfortunately 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

  5. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

  6. After I type
    SELECT * FROM sys.indexes i
    INNER JOIN sys.partitions p
    ON i.indexid = p.indexid
    AND

    the 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    declined  ·  Thomas Walsh responded

    Thank 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

  7. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    7 comments  ·  Format SQL  ·  Admin →
    declined  ·  Thomas Walsh responded

    Thank 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

  8. 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 m

    We 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    declined  ·  Thomas Walsh responded

    Thank 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

  9. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    5 comments  ·  Format SQL  ·  Admin →
    declined  ·  Frederico Jeronimo responded

    Thank 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

  10. 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 SELECT

    16 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    declined  ·  Aaron Law responded

    I’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.

  11. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Format SQL  ·  Admin →
  12. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Format SQL  ·  Admin →

    Hi 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.

  13. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    declined  ·  Thomas Walsh responded

    Thank 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

  14. It could be useful to wrap the result of a select statement into a table valued function (inline or multistatement)

    8 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    declined  ·  Thomas Walsh responded

    Thank 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

  15. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Admin →
    declined  ·  Thomas Walsh responded

    Thank 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

  16. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    declined  ·  Thomas Walsh responded

    Thank 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

  17. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Format SQL  ·  Admin →
    declined  ·  Thomas Walsh responded

    Thank 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

  18. 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    declined  ·  Thomas Walsh responded

    Thank 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

  19. 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
    etc

    6 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    declined  ·  Thomas Walsh responded

    SQL 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

  20. 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 = f

    Of 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 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Format SQL  ·  Admin →
    declined  ·  Thomas Walsh responded

    Thank 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

← Previous 1 3 4
  • Don't see your idea?