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

22 results found

  1. 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)
  2. 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.

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

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

  5. 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)
  6. 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

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

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

    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

  9. I'd like the ability to align my parenthesis with the start of the line above it like so:

    SELECT
    column1
    ,column2
    ,column3
    FROM
    table1
    WHERE

    tableID IN
    (
    1
    ,2
    ,3
    )

    I would also like the option to never insert more than 1 space between words in a line.
    I don't like that there is a full tab between WITH and TARGET below. TAB the whole line or nothing. I can't find a way to get rid of this.
    ;
    WITH TARGET
    AS (
    SELECT
    Column1
    ,Column2
    ,Column3
    FROM
    table1
    )

    A keyboard shortcut to add commas to a…

    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

    1 comment  ·  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)

    Stephen,

    I’m so sorry about the UserVoice formatting issues. I’m going to contact their support to see if this can be fixed. For now, can you please post this in our support forum at http://www.red-gate.com/messageboard/viewforum.php?f=137.

    Davin,

    I’ve declined this suggestion because it contains too many suggestions. Please post each suggestion separately so other users can vote on individual suggestions, which will help us prioritize work. There are some really good ideas here and we appreciate the feedback.

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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    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

  11. My coding preference is to place commas at the beginning of a line, NOT the end. Can you make the placement a config option?

    If you would like I can explain why this is much better than having them at the end of the line.

    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  ·  Aaron Law responded

    I’m declining this suggestion as we already have this option under Format→Commas & parentheses.

  12. I use many "as" clauses in my selects. If I need to use a Group By clause, I can copy my Select items, but then I have to manually remove all of the "AS" clauses. It would be a dream to have them removed during a format!

    Also, what would be involved in having a "change to other favorite connection" mechanism, so I can switch my current query between production, development and test? And it would be doubly sweet if the switch also changed to my usual db on that instance. Like an Alt-Tab allows you to switch between open…

    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

    1 comment  ·  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.

    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

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

  14. 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)
  15. Since "Design Query in Editor" results are totally unformatted, how about an option to automatically format the code returned.

    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

    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

    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

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

    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 would like an option to format select to one line. And make it so that you can save multiple option sets for formatting preferences.

    For example ordinarily a mult line select is good. However in some situations such as copying select statements into a text box it needs to be formatted to be on one line.

    Being able to define mulitple option sets and creating an option to keep select on one line would resolve the issue.

    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

    1 comment  ·  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)
  18. Sorts selected lines. Nothing fancy, but incredibly useful.

    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.

    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

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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  20. A new Format->Data Statement option for when SELECT * FROM is used that keeps it on the SELECT and FROM on the same line.

    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

    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)
← Previous 1
  • Don't see your idea?