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. allow selecting a setting to use CTRL+PgUp and CTRL+PgDn to cycle through tabs in SSMS as in many other applications

    1 vote

    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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  2. As a developer I want to turn a select query into an editable table view so that I can tweak some column values without having to write an update statement.

    Currently I have to write the select query, browse for the table in object explorer and select edit top x rows, open sql pane, paste the query there, press Ctrl+R to update the view, then make the manual edits. Would be great to be able to do that with some kind of macro action from a select query.

    1 vote

    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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    The team have reviewed this suggestion and unfortunately it’s a combination of being something of an edge case for our user base and very difficult to implement.

    So, for now we’ll be declining the request. We’ll review again if we see more demand from our customers.

    Thank you for the suggestion though – we’re always keen to hear from customers. Do reach out if I can do anything else to help.

  3. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    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.

  4. The intellisense will suggest the object as I am typing the linkedserver.db.schema.table in a statement. However, once the statement has been created, the object/columns etc. are underlined in red and hovering over displays the "Invalid object" warning

    2 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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  5. Add some metadata as comment on when the code was formatted and which style was used, the user etc. This would make it possible to find unformated code with simple text searches

    1 vote

    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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  6. I would like to be able to compare two text blocks to see the differences, probably in two different windows. Its easy in most text editors. Wish I could do it right inside SSMS.

    1 vote

    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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    Hi Courtney,

    Thanks for the suggestion. However, the team have reviewed it and we don’t currently feel like it is a good fit for something we would want to prioritise in Prompt.

    Please don’t let that put you off suggesting other ideas – all feedback is great even if we don’t action all of it!

    Tim

  7. SQL Prompt code completion is broken if you use the OPTION ( USE HINT ( ) ) syntax with an update query. To make matters worse, if you are writing a stored procedure, the code completion tools remain broken for every query following the UPDATE statement as well.

    This is on SQL Prompt v9.4.15.8960 with SQL Server Management Studio v17.9.1.

    Here is a repro:
    CREATE OR ALTER PROCEDURE dbo.TestThis
    AS
    BEGIN
    SET NOCOUNT ON;

    DECLARE @var int;

    -- try to do any code completion after this statement
    -- only snippets will work
    UPDATE TestTable
    SET WatchThisBreak = 1
    OPTION( USE…

    1 vote

    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  ·  1 comment  ·  Intellisense  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  8. 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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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

  9. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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

  10. Often we'll do a query e.g. SELECT Id from Table where param LIKE '%Foo%'

    Then we'll want to copy and paste those Ids in to a separate query

    DELETE FROM Table WHERE Id in (.......)

    It would be good if there was a way SQL Prompt could help format the clipboard paste into a comma-separated list.

    (I appreciate this example would be simple to refactor as a JOIN)

    3 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  ·  Intellisense  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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, as it does not align with our current work.

    Kind Regards,
    The Prompt Team

  11. I would like to get suggestions for the WHERE query value. For example, when querying a dimension table, I would like to receive a selection box with the possible values to enter.

    empid firstname lastname


    1 Test User

    2 Dummy User

    Select * from Table
    Where firstname= [Suggestion Box displays the values "Test" and "Dummy" to pick]

    3 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  ·  Intellisense  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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, as it does not align with our current work.

    Kind Regards,
    The Prompt Team

  12. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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

  13. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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

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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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

  15. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    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

  16. Hi!

    It would be nice to have the option to format the current statement only to avoid reformatting everything in the document.
    At the moment I need to highlight the statement I would like to format which is not that handy.
    I guess this should not be a big deal for you cause "execute current statement" works already.
    If possible I would like to see that option as part of the context menu and as a (key) shortcut.

    Thanks for looking into this!

    Torsten

    3 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    declined  ·  Thomas Walsh responded

    We currently are not planning on doing this at this time, unless there is a significant increase in demand.

    Thanks for your suggestion,
    The Prompt Team

  17. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    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.

  18. SQL Prompt 7.3.0.437 will format the following

    /*******************************************************************************

    troubleshooting queries - query_hash and query_plan_hash
    

    ********************************************************************************/

    /*

    query_hash
    Binary hash value calculated on the query and used to identify queries with 
    similar logic. 
    You can use the query hash to determine the aggregate resource usage for 
    queries that differ only by literal values.
    

    */

    like this: (too many empty lines added with Whitespace / Preserve existing new lines between statements)

    /*******************************************************************************

    troubleshooting queries - query_hash and query_plan_hash
    

    ********************************************************************************/

    /*

    query_hash
    Binary hash value calculated on the query and used to identify queries with 
    similar logic. 
    You can use the query hash
    1 vote

    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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  19. Smart rename does not work properly in queries where there are common table expressions and, for instance, two of them use the same alias for the same (or even different) table. When I want to change the name of an alias, then the rename should not pick up the same alias from other scopes. The current rename is potentially dangerous because there could be a clash when, for instance, one piece of a query is dependent on another (think: cross apply or correlated query). I would classify the current behaviour as a bug but I can imagine that one could…

    1 vote

    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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    declined  ·  Aaron Law responded

    Hi Darek,

    It sounds like you might have hit a bug as the rename in SQL Prompt should be respecting the scope of the alias. I’m going to close this UserVoice idea since it sounds more like a bug than a feature. I see you already have a ticket logged with our support team – if you forward them recreation steps/scripts we can investigate this further.

    Thanks,
    Aaron.

  20. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
← Previous 1 3 4
  • Don't see your idea?