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

179 results found

  1. When making a CREATE TABLE statement, I would like to have the comma at the beginning of the line.
    I've set the lists.placeCommasBeforeItems property to true, but it's not working for the DDL statement.

    So either fix the comma placement option for DDL statements or add an option for it.

    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)
  2. Would it be possible to include the attached menu options in the Style format configuration? It would be very helpful to have it when Formatting SQL instaead of executing it after the Format.
    At least, "Apply Casing Options", "Qualify Object Names" and "Remove Square Brackets".

    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)
  3. We have some comments placed in the code preceeded by one or more TABs. When formatting SQL all these TABs are replaced by one WHITESPACE.
    Is it possible to maiantain these TABs?

    See attached examples.

    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)
  4. We would like an option to get rid of the semicolons. You can only configure the whitespace. When we apply "Format SQL" many semicolons are inserted in our code and we don't wnat them.
    Is it possible to add an option when formatting Style for eliminating semicolons?

    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)
  5. On our team we are very particular about the order of our joins as they are written in the query. I would like to request an option to format joins so the table you are joining on is the first item in the join. In the example below you join to tableb so the first ON clause is tableb, subsequently on the tablec join the first join is on objects from tablec.

    SELECT (columns)
    FROM tablea a
    INNER JOIN tableb b ON
    a.id = b.id
    INNER JOIN tablec c ON
    b.id2 = c.id

    To:
    SELECT (columns)
    FROM tablea a
    INNER…

    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)
  6. When making a CREATE TABLE statement, there should be a formatting option to align the data-type behind the field names.

    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)
  7. A previous request titled "Formatting SQL Transaction" was flagged as Completed in 2018; however, no option to adjust the formatting for BEGIN TRAN / COMMIT TRAN blocks exists in the latest release of SQL Prompt version 10.

    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)
  8. Add the ability to specify a named formatting style using a comment block.

    Add functionality to specify, in a comment block, what formatting style should be used when formatting the current file. It could be a simple addition to the existing turn-on/off formatting comment.

    Perhaps something like this:
    --SQL Prompt Formatting On - Style = "My Style"

    The above would turn on formatting and specify what style to use.

    This functionality would be helpful in many ways.

    • It is already convenient to have multiple formatting rules, this would keep the user from having to remember what rules apply to what…

    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

    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)
  9. Allow an option when saving / running a file that you format the sql to the format selected. Will make sure the whole team follow the standards and does not forget to run the formatter.

    4 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)
  10. Have buttons to add/remove square brackets rather than tucked away under Options, so they can be toggled on or off easily.

    And/or move the square brackets option out of Options and into the actual formatting style (like the option to remove additional whitespace) so it can be saved and shared as a template

    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

    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)
  11. If I create a query with an ORDER BY clause such as ORDER BY 1, 2; SQL Prompt will flag the ORDER BY and report ORDER BY clause with constants.

    It would be nice to have an option to have SQL Prompt replace the constant(s) with the correct column names.

    4 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)
  12. DAX Studio has a splendid feature that I think is missing from SQL Prompt and could be rather easily implemented. In DAX Studio one can switch with one mouse click between putting commas before or after the column names. The "before" option greatly speeds up debugging but such formatting should not be left in production. In prod we want to have commas after the column name. Would it be possible to add a quick action or option to SQL Prompt so that commas are immediately placed at the end or beginning of column names? I know there are formatting styles…

    4 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)
  13. I am a brand new user (1 day) for SQL PROMPT. I managed to get my parameter statements to align, but there is no option on my custom formatting style to align my set statements. See the attached jpg. Trying to get it to look like the yellow highlighted area.

    4 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)
  14. Please add support for
    SQL Prompt Support for Azure Synapse (Azure SQL Data Warehouse)

    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

    4 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. When adding brackets via CTRL+B,CTRL+B, Windows-based principals (users, groups, etc.) are not correctly bracketed. The brackets are placed around the domain or computer name portion of the principal, instead of the combination of the domain/computer and user/group name.

    For example, if this statement is entered

    ALTER SERVER ROLE sysadmin ADD MEMBER MYDOMAIN\USER

    using CTRL+B,CTRL+B will yield this:

    ALTER SERVER ROLE [sysadmin] ADD MEMBER [MYDOMAIN]\USER

    instead of the correct syntax:

    ALTER SERVER ROLE [sysadmin] ADD MEMBER [MYDOMAIN\USER]

    Would also be helpful if principals from NT AUTHORITY and NT SERVICE could be correctly handled.

    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)
  16. A formatting feature to change syntax between these two forms

    SELECT field1 AS Alias1, field2 AS Alias2 FROM table1

    SELECT Alias1 = field1, Alias2 = field2 FROM table1

    Ideally useable without having to invoke the "Format SQL" command.
    Hopefully selectable as an enabled option within a Format SQL style set.

    I spend a non-trivial amount of time reformatting SQL code for leading/trailing comma placement and alias AS/= placement, this would be a HUGE help

    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)
  17. Removing brackets from database names causes VS schema compare to indicate file differences because VS requires database reference variables to be enclosed in brackets. Need an option to exclude removal of brackets from database and server in three and four part names.

    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

    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)
  18. Would love to have the option to have all conditions (AND / OR) aligned (or same indentation) with the ON clause, for example:

    FROM dbo.orders AS o
    JOIN dbo.orderAttributes AS oa
    ~~ON oa.companyID = o.companyID
    ~~AND oa.orderID = o.orderID

    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

    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. Allow the FROM, WHERE, GROUP BY, etc. clauses to indent from the select.

    Change
    SELECT Col1,
    Col2
    FROM Tab1
    WHERE a = b

    To

    SELECT Col1,
                  Col2
        FROM Tab1
        WHERE a = b
    
    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)
  20. The below script causes SQL Formatter rules to fail with the error "Script parsing error(s) ... Incorrect syntax near url. ... Failed refactorings: Insert semicolons (Script parsing errors)"

    create database foo;
    go
    
    backup database foo 
        to url = N'https://foocorp.blob.core.windows.net/backups/foo/foo_1.bak';
    go
    
    restore database foo 
        from url = N'https://foocorp.blob.core.windows.net/backups/foo/foo_1.bak';
    go
    

    SSMS Parse (ctrl+F5) reveals that this snippet parses correctly. When replaced with a valid URL target, this syntax also executes without error.

    Please update the semicolon rule and any other necessary rules to handle for backup/restore from URL as a valid formattable syntax.

    (possibly related? https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/40184173-format-sql-backup-to-url-with-credential-breaks-co)

    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

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