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. It would be nice to select a small already formatted script, and unformat it by putting it into one line.

    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 →
  2. 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 →
  3. I'm finding my comments are hanging out all on their own after the rest of my code is formatted. I would request a feature to allow comments to indent to the same level as the code on the line below.

    56 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 →
  4. I'd like to be able to configure a style for CASE statements using options like the following:

    • New line after THEN
    • New line before ELSE
    • New line after ELSE
    • ELSE match indent of CASE
    • END match indent of CASE

    It would also be nice to have a threshold setting (in number of characters) so the formatting settings are only applied if the length of a CASE statement exceeds the threshold.

    64 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

    9 comments  ·  Format SQL  ·  Admin →
  5. Instead of

    IF xxx
    BEGIN
    sss
    sss
    END

    It should format as

    IF xxxx
    BEGIN
    ssss
    ssss
    END

    for all cases where begin and end are used.

    18 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 →
  6. I recommend splitting the two as distinct user settings. Qualify objects should have two options: Always and Only When Necessary. The reason is that in many cases, such as a simple select from one tabe, table name in front of each field is simply clutter, adding no value. I fact, I remove them manually, as I am more interested in brackets than qualifying object names.

    Brackets setting (new seeting) should have a simple Yes/No option - When set to Yes, for consistency, I recommend using brackets even in aliases (another user requested this already).

    Other thant the above, SQL Prompt…

    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 →
  7. Support lower-casing keywords instead of upper-casing them; this makes reading the query far easier as the app-specific bits are more visible

    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

    2 comments  ·  Format SQL  ·  Admin →
  8. Can not use SQL prompt to layout XML data type functions, for example this statement:

    SELECT(SELECT 1 Col
    FOR XML PATH(''), TYPE).value('.', 'VARCHAR(MAX)')

    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

    completed  ·  1 comment  ·  Format SQL  ·  Admin →
  9. Allow alignment of column aliases in a Select statement.

    22 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 →
  10. 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 →
  11. 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 →
  12. If I had the table [Address] that had the columns StreetAddress1, StreetAddress2, City, State and ZipCode defined and the following existing code was formatted:

    SELECT streetaddress1,
    streetaddress2,
    CITY,
    zipcode
    FROM [address]

    I would like to see SQL Prompt match the case of the underlying object such that the results after formatting would be:

    SELECT StreetAddress1,
    StreetAddress2,
    City,
    ZipCode
    FROM [Address]

    This should apply to all underlying objects (procedures [name and parameters], tables [columns, index names (used in hints), etc., functions and views; and anything else I forgot). It should also apply to variables defined within a procedure (e.g. DECLARE @MyValue…

    63 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 →
  13. I wish there where a shortcut/command to change a statement like

    INSERT INTO Mytable(Id,Code,Label) VALUES (@Id,@Code,@Label)

    in

    UPDATE MyTable
    SET Id=@Id, Code=@Code, Label =@Label

    Even if it looks trivial on this statement, doing it with a table with 10+ Columns might be cumbersome.

    79 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

    14 comments  ·  Format SQL  ·  Admin →
  14. In order for the braces/parenthesis highlighting to work currently, you must run the native Intellisense feature in SSMS, which creates some issues with SQL Prompt. If this were written in as part SQL Prompt, we'd be able to turn off Intellisense completely.

    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

    7 comments  ·  Format SQL  ·  Admin →
  15. There appears to be several items (BEGIN and END tabbing, table declaration placement, number of tabs for the join condition...etc.) that happen automatically when you click Refactor that Format SQL that you can't configure in the UI.

    39 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 →
  16. 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 →
    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

  17. Add a functionality of disabling SQL Prompt auto-formatting feature for blocks of code. Use SQL comments for 100% sql compatibility. Example:

    SELECT 1, 2, 3
    --<SQLPROPMT disable>
    select 4, 5, 6
    --</SQLPROPMT>
    select 7,8,9

    in the code above, the first and third statements would be auto-formatted but not the second one.

    It would be especially useful for very long scripts where a single formatting template is not an option.

    64 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

    13 comments  ·  Format SQL  ·  Admin →
  18. 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 →
    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.

  19. SQL Prompt 5 does not behave the same as SQL Refactor when it comes to formatting parameters that may be passed to a function, stored procedure, etc. You can increase the text wrapping, but that is not a full-scale solution. A better solution would be to allow you to want to align the parameters on new lines or put all parameters on one line ignoring the text wrapping limit.

    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 →
  20. 90 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

    25 comments  ·  Format SQL  ·  Admin →
1 2 4 Next →
  • Don't see your idea?