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

173 results found

  1. It would be nice to have an option under Formatting Style -> CTE to allow closing parenthesis behavior, just like the opening parenthesis one:
    - Place closing parenthesis on new line
    - Closing parenthesis alignment

    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)
  2. When formatting SQL, it would be good to have the option to put the item following an AND/OR on a new line and align it, so instead of:

    WHERE
    OutgoingResults.LoadDateKey = 20191106
    AND OutgoingResults.FeedName = 'TestFeed'

    we have

    WHERE
    OutgoingResults.LoadDateKey = 20191106
    AND
    OutgoingResults.FeedName = 'TestFeed'

    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

    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)
  3. It would be nice if SQL Prompt had a way to add in the code DROP TABLE IF EXISTS #table for temp tables. Ideally it would add the statement immediately before the table is created from a CREATE TABLE or SELECT INTO statement.

    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

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

    SELECT TOP 10...

    to

    SELECT TOP (10)... should be a formatting option.

    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

    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. Current formatting is:

    CASE
    WHEN 1 = 1 THEN
    'Hello World'
    END

    I need the option to put the expression on the same line:

    CASE
    WHEN 1 = 1 THEN 'Hello World'
    END

    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

    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)
  6. What I’m proposing, would change the way we type our SQL scripts. I’m not suggesting we try to pass or force through a new SQL standard. I’m simply suggesting a new dynamic “view” of the SQL syntax, which would allow for a more natural support of intellisense. With today’s IDE’s this simply doesn’t work. Intellisense doesn’t know where to pull the “what” from. The “what” comes from the “where”, (the FROM clause).

    The underlying SQL script itself, would still comply with the SQL standards. This “view”, would perform three tasks: 1) allow the end-user to type their SQL more like…

    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

    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)
  7. Hi there. Currently, SQL Prompt formats an invocation of a sproc like this:

    exec sproc @param1 = ?,
    @param2 = ?,
    @param3 = ?

    I'd like to be able to change this into:

    exec sproc
    @param1 = ?,
    @param2 = ?,
    @param3 = ?

    Thanks.

    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)
  8. Currently SQL Prompt only has one option for formatting insert statements which poses a problem for us with multi value set inserts.

    Ideally we'd be able to select a formatting for a single value set insert and another format for a multi value set insert.

    This would allow us to do something like this:

    -- Single Value Set Insert
    INSERT INTO TestTable (TestName,
    ~~~~TestValue,
    ~~~~TestDate)
    VALUES (N'Something',
    ~~~~140,
    ~~~~'1/1/2019')

    -- Multi Value Set Insert
    INSERT INTO TestTable (TestName, TestValue, TestDate)
    VALUES (N'Something', 140, '1/1/1900'),
    ~~~~(N'SomethingElse', 150, '1/2/1900'),
    ~~~~(N'SomethingElse2', 160, '1/2/2000')

    The issue for us is that we have need of…

    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

    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)
  9. It would be nice to have ability to format the documents automatically, have an API or command line command for that. For example to force format when check-in code.

    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

    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. Add option to leave semicolon on same line if statement only use one line.

    My idea is an additional to the idea captured in the "semi colon placed on new line" request.

    It would be nice to have checkbox for the semicolon-on-new-line option to not move the semicolon to a new line if the statement is ONLY one line.

    For example:
    SELECT TOP 10 * FROM dbo.Table
    ;
    should be
    SELECT TOP 10 * FROM dbo.Table;
    instead, but
    SELECT TOP 10 *
    FROM dbo.Table
    ;
    will remain unchanged by formatting.

    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

    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)
  11. Merge Command Formatting

    For MERGE commands there is no way to make the conditional requirements with 'ON' follow the same style as JOIN's ON. I noticed back on 5/17/2017 there was a closed 'Merge command formatting options' through the User Voice, stating that an experimental feature was available for SQL Prompt 7.4. What happened? In my 10.1.7.15015, within the formatting styles, there is no area for MERGE like there is for JOIN.

    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)
  12. When typing SQL aliases are inserted automatically if configured. However when opening existing query from some other source it would be nice to execute an options to add missed aliases based on the same configured rules as with editing.

    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)
  13. If a sql command is written with an APS specific statement (for example: "CREATE TABLE AS, or "OPTION (Label = 'Query Description')" ), then a script parsing error appears.

    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)
  14. Someone else has submitted this suggestion and it is marked completed. However, it does not seem to do so in my version of SQL Prompt (9.2.6.6145)

    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)
  15. Similar to the CTE request https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/19545028-format-cte-closing-parenthesis

    Aligning the closing parenthesis on its own line, in the same column as the opening paren, makes the subquery stand out, as well as making the alias stand out.

    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)
  16. Add the ability to exclude columns from appearing in the auto-generated INSERT statements. I have to manually remove certain columns every time.

    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)
  17. It would be nice to have an option to not but square brackets around aliases as it's our style to not do so. We find it makes the aliases unnecessarily long,since most of our aliases are 1 or 2 letters.

    For example

    SELECT
    T.[TableId],
    T.[Name]
    FROM
    [dbo].[MyTable] T

    vs

    SELECT
    [T].[TableId],
    [T].[Name]
    FROM
    [dbo].[MyTable] [T]

    Currently we have to go back and rename an alias to itself so that the square brackets go away.

    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

    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. Feature to automatically add column alias with the name of the column.
    E.g.:

    SELECT Column1
    FROM Table1 AS t1

    changes to:

    SELECT Column1 AS Column1
    FROM Table1 AS t1

    If the name can not be found add a dummy-alias like Exp1

    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

    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. Please add an option be added to SQL Prompt to trim all white space.

    Ideally, the following would be supported:
    - Ability to execute against a query window or block of selected code
    - Available as a stand-alone shortcut
    - Can include as part of a Format SQL style
    - Option to remove a) leading spaces, b) trailing spaces, c) both

    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)
  20. Currently the behavior for inserting a full INSERT statement is that it produces something like this:

    INSERT INTO dbo.ContactPictures
    ( InterActionPersonalContactID ,
    InterActionFirmContactID ,
    ImageFileStoreFilePathSegment ,
    Source ,
    ManuallyCreatedByUserAccountName ,
    DateTimeLastUpdated
    )
    VALUES ( 0 , -- InterActionPersonalContactID - int
    0 , -- InterActionFirmContactID - int
    '' , -- ImageFileStoreFilePathSegment - varchar(256)
    '' , -- Source - varchar(20)
    N'' , -- ManuallyCreatedByUserAccountName - nvarchar(40)
    GETDATE() -- DateTimeLastUpdated - datetime
    )

    Hard-coded values are rarely what's needed, though; it would be very useful if it could generate variables and use them in the statement, like this:

    DECLARE @InterActionPersonalContactID INT = 0…

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