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

176 results found

  1. Support request #137199: Provide an option to indent AND/OR entries in a WHERE clause to line up indented, but leave AND/OR entries directly underneath ON clauses:

    SELECT
            t1.col5
            , t2.col6
    FROM
            table1 t1
            INNER JOIN table2 t2
                    ON t1.col1 = t2.col1
                    AND t1.col2 = t2.col2 -- AND is directly below ON clause
    WHERE
            t1.col3 = 'Test'
            AND t2.col4 = 5 -- AND is indented underneath WHERE

    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 treat the 'LIKE' operator the same as '=' in the Expressions\Operators settings so they are all aligned?

    select AddressID
    from Person.Address
    where ModifiedDate
    between dateadd(month, -6, getdate())
    and getdate()
    and City = 'Bothell'
    or left(PostalCode, 2) like 'CB%'
    or PostalCode = @prefix + @suffix

    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)
  3. When I type code I like to line up all the equals (=) signs using tabs so that all the code to the right of the equals sign lines up nicely on my screen. I find this really useful for improving readability when using column aliases, in joins, and in update statements.
    I can't find an option in SQL Prompt to do this and it annoys me when I format my SQL and all the equals signs become ragged.

    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. If I have a very large script with the majority of it with formatting disabled, or even with just a highlighted small area... the ctrl-K,ctrl-Y formatting seems to consider the parts it will not be formatting. Example: code in a separate window will format instantly while in a window with 100k lines with same code highlighted it will take a long while. This seems to indicate that it is considering all of the code even though it is only formatting a small piece.

    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. In version 7 the Style option FormatActionRemoveSquareBrackets was removed from the .sqlpromptstyle Style file into the .settings Settings file. I would like it moved back into the Style file, along with all other Style options settable under "SSMS > SQL Prompt > Options > Format > Style". See https://productsupport.red-gate.com/hc/en-us/requests/122489 for additional details.

    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. It would be nice if the IN clause were formatted like a logical function that returns a value so that it followed the options and rules for parentheses and were indented according to its place in the logical expression. (paying attention to the ANDs and ORs if present)

    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)
  7. Although used quite often, != is not ANSI compliant for NOT EQUAL. Have an option in SQL PROMPT Code Formatting to automatically replace != with the ANSI compliant <>.

    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. SQL Complete has a great feature to allow copying the result as html table. I wish this feature was available in RedGate. This is the feature I would use multiple times every day.

    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)
  9. When using a synonym, the alias name generated is based on the synonym orginal table, not in the synonym name.

    So, if I have a synonym named sch1.ShortTableName that maps on AnotherDatabase.sch2.TableWithLongAndComplexName

    If I write

    SELECT * FROM sch1.ShortTableName

    It ends being

    SELECT * FROM sch1.ShortTableName AS twlacn

    It would be good that in case of synonyms, the alias name was based on the synonym name, not on the source object name.

    Or to keep backwards compatibilty, to have a setting that lets us choos either to follow the synonym name or the source object name.

    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)
  10. Allign all equals of a set part in an update statement

    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)
  11. Our dev group versions our styles. A small change between style versions can cause numerous changes in a single file making peer reviews more difficult than they need to be.

    My suggestion is to add an Format > Styles > Actions option to add style stamp. Implementation would be adding a comment with a style/version stamp at the top of the file when a format is applied. If the comment exists prior to formatting, that style will be used by SQL Prompt regardless of selected style. If the style/version is not found, the selected style is used. To change which…

    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)
  12. I would love an option where, after adding an alias to a table, you can add it as a prefix to all columns coming from that particular table at once.

    Some keystroke like Ctrl + F2 would be nice.

    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)
  13. Database-specific snippets.

    We have 80 or so databases scattered across 200+ instances and many tables have similar names or identical names with differing schemas: compare person.personpe, dbo.person & finance.personpe. This particular is extreme and there are more examples but the principle applies.

    I would love to be able to define pe as a snippet at a database level so that I can keep my snippet names short and so that I don't have to rename them manually when I am in SSMS with a lesser used database.

    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)
  14. Can we add option to have "WITH (NOLOCK)" in the Aliases tab in the Options

    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)
  15. 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)
  16. 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)
  17. 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)
  18. It would be nice if the new Bulk Formatting or Bulk Code Analysis functionality could also target items directly in the database. This would save time because I wouldn't first have to save objects definitions to my computer.

    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. 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)
  20. It would be great to be able to use the formatter to create an automated table of contents based on some recognized commented pattern. For example, I could begin each section of code with:

    --******
    -- Title of section
    --******

    Then after using the formatter it would see the commented section and add the line number for each section in the beginning of the script. I imagine something similar to MS Word's auto generated table of contents.

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