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

80 results found

  1. Would like improve tab & parenthesis placement of subqueries ...wherever placed in query ...be it in JOIN, WHERE, HAVING ...or even in SELECT ...ALSO would like option for 1st tabbed item in SELECT list to be the starting position on each row for each subsequent item which includess the placement of the 'prefixed' comma ...see below...

    BEFORE (Current formatting)...

    LEFT OUTER JOIN (
    SELECT
    f1
    , f2
    , f3
    FROM
    dbo.t1
    WHERE
    f9 = 'x'
    ) AS e
    ON e.f1 = b.f1
    AND e.f2 = b.f2

    AFTER...

    LEFT OUTER JOIN
    (
    SELECT
    f1
    , f2
    , f3
    FROM
    dbo.t1
    WHERE…

    17 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)
    completed  ·  Andrei Rusitoru responded

    This feature was released in version 8.1 of SQL Prompt as part of our rework of parentheses formatting.

    If there are any missing features please let us know by creating a new suggestion.

    Kind Regards,
    The Prompt Team

  2. Request space options for semicolons that are analogous to space options for commas (see SQL Prompt-->Options-->Format-->Commas & parentheses)
    p.s. -I really don't like the current auto-insertion of a space in front of the semicolons. At the very least, the semicolon formatting should remain untouched upon running Format SQL.

    17 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

    3 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)
    completed  ·  Paul Stephenson responded

    As of SQL Prompt 5.2.8, spaces are no longer inserted before semicolons during a Format SQL operation. We have not added a new option, as we have found no-one who likes the spaces to be there. If we receive further feedback to the contrary then we will consider adding an option in the future.

  3. Moving commas from "end" to "start" or vice-versa is buggy when comments exist after each column or parameter. This is an issue regardless of the type of statement (SELECT, INSERT, UPDATE, CREATE TABLE/VIEW/FUNCTION/STORED PROCEDURE, etc).

    Here is my original SP with commas at "end" followed by comments (hyphens are used for indentation due to HTML formating issues):
    CREATE PROCEDURE dbo.MyProcedure
    ---- @Param1 int, --Param1 comments
    ---- @Param2 int, --Param2 comments
    ---- @Param3 int --Param3 comments
    AS
    BEGIN
    ---- SELECT Col1 , --Col1 comments
    ---- ---- Col2 , --Col2 comments
    ---- ---- Col3 --Col3 comments
    ---- FROM MyTable
    ---- RETURN
    END…

    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

    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)
  4. Any query where "AT TIME ZONE" is used (new feature in SS '16), the Format SQL throws and error.

    "SQL Prompt was unable to complete this operation. Problem areas have been highlighted"

    The highlighting start from "AT TIME ZONE..."

    Thank you

    14 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. Similar to the existing Qualify Object Names and the other pending request to fix case of all object names, I would like to have an option to add brackets added to all database object names (columns, tables, schemas) where they are missing.

    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

    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)
  6. Currently, no matter what settings are applied, table names are always placed on a new line, for example:

    SELECT
    ID,
    Thing

    FROM
    TableName

    JOIN
    OtherTableName
    ON blah=moo

    WHERE
    something <> something else

    My personal preference is for:

    SELECT
    ID,
    Thing

    FROM TableName

    JOIN OtherTableName
    ON blah=moo

    WHERE something <> something else

    Please can we have an option to achieve table names on the same line as their action (FROM / JOIN)

    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

    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)
  7. I would like an option to align the type declarations, for example when declaring the columns in a table variable I currently get:
    DECLARE @MyExample TABLE
    (
    MyCol1 INT ,
    MyOtherCol VARCHAR(10)
    )

    Which I would quite like to see laid out as:
    DECLARE @MyExample TABLE
    (
    MyCol1 INT ,
    MyOtherCol VARCHAR(10)
    )

    The same is true for all other places where I'm declaring, so the parameters for a procedure for example

    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

    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)
  8. The auto-generated INSERT statement BADLY MISALIGNS data when "Place commas at start" is enabled. I've listed all the settings to reproduce the issue at the end of this post.

    The comma and associated info are on a separate line (almost useless - Worse when I need to delete some of the columns). See this example (generated by SQL Prompt Pro 5.1 - hyphens represent tabs due to HTML limitations):

    INSERT INTO dbo.Test
    ---- (FirstName
    ---- , LastName
    ---- , LocationAddress
    ---- , LocationCity
    ---- , LocationState
    ---- , LocationZip)
    VALUES (''
    ---- , -- FirstName - varchar(100)
    ---- ''
    ----…

    11 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)
  9. SELECT
    *
    FROM
    Temp1

    --Remove this kind of extra spacing between statements option is Needed
    

    SELECT
    *
    FROM
    Temp2

    --Remove this kind of extra spacing between statements option is Needed
    

    SELECT
    *
    FROM
    Temp3

    10 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)
  10. I want to switch between TEAM and PERSONAL styles for Format SQL. It currently takes 8 mouse clicks to achieve this. Could you add a style lookup on the context menu or Red Gate tools menu and apply the style to the current document automatically as soon as it is selected.

    I want my team to be able to work in their personal SQL format, but always save in the TEAM format.

    9 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)
  11. Place semi-colon on new line.

    I frequently format my statements as I'm developing them, but multiple times now I've started to add an Order By or some other clause after the auto-inserted semi-colon. I would like to see an option to place the semicolon on the line following the sql statement rather than directly after. This would enable me to start typing at the start of the next line without having to check if a semicolon had been added to the preceding line.

    Example:
    Select * From Table
    Where A = 1; -- Semicolon added by formatting
    Order By A

    9 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)
  12. We have a lot of legacy code that is written as

    SELECT Field1 as Name1, Field2 Name2 FROM Table X
    (Sometimes they use AS when setting the alias, othertimes they do not).

    I would love the ability to convert this to
    SELECT
    Name1 = X.Field1
    , Name2 = X.Field2
    FROM Table X

    Both having the ability to switch between Name = Value and Value AS Name and to auto add the alias to all fields.

    9 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 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)
    completed  ·  Andrei Rusitoru responded

    This feature was released in version 7.3 of SQL Prompt.

    If there are any missing features please let us know by creating a new suggestion.

    Kind Regards,
    The Prompt Team

  13. Would love to be able to have all predicates at the same indent level ie:

    WHERE something = yetsomethingelse
    AND somethingelse = anotherthing

    9 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)
  14. Provide an option to not indent the FROM and WHERE clauses to remain them lined up with the SELECT clause while maintaining a single space after each clause.

    9 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)
  15. 2012 keywords like LEAD( LAG( etc.

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

    We’ve released SQL Prompt 6 which includes support for 2012 analytic functions (LEAD, LAG, CUME_DIST, etc)

  16. We need the ability to quickly switch between T-SQL Formatting styles.

    I work on a team where everyone likes code formatted differently. Also, we're required to use a specific format before checking SQL Code into TFS. I need a quick way to switch between styles so I can code in a format I like and then switch to our standard before check-in. Toad already offers this.

    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

    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)
  17. Please add formatting options for the deferent parts of the MERGE command like you have for INSERT

    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

    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. when creating a WHERE colname IN ('a','b','c')

    it would be nice if you could paste a set of rows from excel into SSMS and then add the quotation marks and commas

    i.e.

    A
    B
    C

    becomes

    'A',
    'B',
    'C'

    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  ·  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. Option to remove trailing spaces from script lines. This can be done via search/replace functionality but it would be nice to have this taken care of automatically during the SQL code reformatting

    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

    3 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. Its a very nice tool who made developer life very easy and do a major and boring task of code formatting by just pressing CTRL+K+Y.
    i need a feature who can help developer very much like 1)If there is a SQL Insert query and i select a field it should highlight the value assigned to that selected field because finding this become more painful in formatted code.

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