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. On SQL Prompt Aliases section I would like to have on custom aliases when I add a new a dropdown or a list view where I can pick object instead of me writing the object name. it would be even better if it has an option to show only object not already added with alias.

    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. 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)
  3. In SQL Prompt 8, multiple-line comment blocks (surrounded by /* */) are automatically indented to the SQL code surrounding them when formatting.

    Can you please add an option to preserve the indentation of these blocks? My team keeps most comment blocks left-aligned for consistency and readability, but SQL Prompt will automatically move them when formatting.

    This was not an issue in SQL Prompt 7, so all of our comment blocks are now moving when upgrading to SQL Prompt 8 and there is no option to preserve them. Thank you.

    23 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. 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)
  5. Provide an option in Styles to let the right hand side of clauses in UPDATE statement be aligned.

    Example:

    UPDATE~~EDSV
    SET~~~~~eDocSessionID~~~~~~~~~~~~~~~~~~~~~=~CONSV.eDocSessionID~,
    ~~~~~~~~eDocSessionKey~~~~~~~~~~~~~~~~~~~~=~CONSV.eDocSessionKey~,
    ~~~~~~~~eDocSessionValue~~~~~~~~~~~~~~~~~~=~CONSV.eDocSessionValue~,
    ~~~~~~~~eDocSessionValueTextStyleOverride~=~CONSV.eDocSessionValueTextStyleOverride~,
    ~~~~~~~~eDocSessionValuePositionOverride~~=~CONSV.eDocSessionValuePositionOverride~,
    ~~~~~~~~eDocSessionValueLockdown~~~~~~~~~~=~''
    FROM~~~~eDocStd2.dbo.eDocSessionValues~AS~EDSV
    ~~~~~~~~INNER~JOIN~#changedOrNewSessionValues~AS~CONSV~ON~CONSV.eDocSessionID~=~EDSV.eDocSessionID
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~AND~CONSV.eDocSessionKey~=~EDSV.eDocSessionKey;

    42 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)
  6. It would be cool if SQL Prompt was able to remove trailing whitespaces/tabs not only for T-SQL, but also for comments.

    It's not something crucial, but rather nice-to-have

    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)
  7. I really like the latest formatting flavours. Aligning the equivalency symbols in joins is nice, but could I also align the ON keyword? Or pick which one I want to align on.

    SELECT *
    FROM table1 a
    JOIN Table2 b__ON a.foo = b.foo
    JOIN Tab3 c
    ___ ON b.fa__= c.fa

    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

    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. We use a lot of dynamic SQL. I'd like to be able to format dynamic SQL that is in a string, eg. and NVARCHAR. e.g.

    Input: DECLARE @sql NVARCHAR = '

    SELECT foo from bar where foobar = ''foobarred''
    '

    I'd like to be able to highlight the text inside the NVARCHAR for formatting. SQL Prompt would need to handle doubled quotation marks as in my example above.

    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

    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. I don't want to use brackets for my code (unless I have to). So, for example, dbo.Orders is fine, but dbo.Order isn't. It would be nice if SQL prompt caught this and automatically enclosed the SQL Keyword "Order" in square brackets (i.e. dbo.[Order] AS o)

    51 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)
  10. Complex multi-line statements are much easier to read when separated by an empty line above and below them. Please add an option to turn on "Empty Line Above/Below Multi-Line Statements".

    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)
  11. 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)
  12. Please add an option to align "then" keyword and the expressions.

    Current format:
    declare@fooidint=(case
    _______________________when@barId=7then2
    __
    ___________________when@barId=800then1
    __
    ___________________else5
    __
    _______________end
    _
    _________________);

    Suggested format:
    declare@fooidint=(case
    _______________________when@barId=7then2
    _
    ___________________when@barId=800_then1
    __
    ___________________else________________5
    _
    _______________end
    _
    _________________);

    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)
  13. Hi!

    I would be nice to have the option to enable word wrap for the comments as well.
    The number of maximum characters for the comment should be aligned with "Wrap lines longer than" for SQL statements.

    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

    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. Add additional option for "remove unnecessary brackets" which would keep brackets around syntax highlighted words.
    "Status", "description", and "Type" are examples of special words that are syntax highlighted, but they aren't full reserved keywords, so would want the brackets kept.

    How to configure and prevent SQL Prompt from removing brackets around Syntax highlighted words?
    We only have the following settings:
    a) Options > Inserted Code > Special Characters > Brackets > Enclose identifiers within square brackets [] = NO (which is our desire)
    b) Options > Format > Styles > Actions > run format > Add/remove square brackets = YES,…

    30 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. I think SSMSBoost has this feature: being able to add configurable guide lines to limit the query writing space to a specified number of characters/columns. This is very handy as I always want to keep my code narrow, within the 80-char limit. Currently, I have to install SSMSBoost for it... Could this please be added to SQL Prompt? This is probably a quick feature to implement and would be tremendously useful. Thanks.

    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

    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)
  16. 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)
  17. I think it would be great if SQL Prompt had the functionality to expand a view that is used in a query. So if you have this schema:
    CREATE TABLE dbo.Person
    (
    PersonID INT IDENTITY(1, 1)
    PRIMARY KEY,
    LastName VARCHAR(30),
    FirstName VARCHAR(30),
    );
    GO

    CREATE TABLE dbo.Student
    (
    StudentID INT IDENTITY(1, 1)
    PRIMARY KEY,
    PersonID INT,
    StudentNo VARCHAR(100)
    );
    GO

    CREATE TABLE dbo.Class
    (
    ClassID INT IDENTITY(1, 1)
    PRIMARY KEY,
    ClassName VARCHAR(100)
    );
    GO

    CREATE TABLE dbo.ClassRoster
    (
    ClassID INT,
    StudentID INT
    );

    GO

    CREATE VIEW dbo.Students
    AS
    SELECT
    S.StudentID,
    P.LastName,
    P.FirstName,
    S.StudentNo
    FROM
    dbo.Person AS P
    JOIN dbo.Student AS…

    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

    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)
  18. Setting the option to use spaces instead of tabs for intending (our house policy) only works for new tab presses.
    I would like a simple action that would replace all tabs in the current document with spaces -- using the tab-to-spaces value as set in options. Sublime Text has this and I use practically every time I edit anything.

    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

    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)
  19. It would be awsome if there was an option that would format an SQL Script automatically after opening it in SSMS / VS. So if you load a file it would be formatted automatically with your selected formatting style. It would be great too if this auto format option could be switched on and off in the Options.

    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

    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. Semi-colons are automatically added at every END reserved key word. Make this optional.

    END(;)
    END TRY(;)
    END CATCH(;)

    This just look weird to everyone

    BEGIN
    ....
    END(;) <=== don't want it here... there's an ELSE continuation.
    ELSE
    BEGIN
    END(;)

    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

    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?