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. Opening over 2500 code objects to set a baseline format, required by a large customer, is a daunting manual task.

    Many of Red Gate's tools provide command-line functionality.

    Please add it to Prompt so we can bulk (re)format SPs, UDFs, Triggers. Integration into the commit-path (we use SVN) would be ideal for standardized check-ins (Commits).

    Can't recall whether a style is exportable... (License key awaited at new employer) Should be able to point to UNC location for the style to use.

    109 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

    28 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. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  3. Include an option when reformatting SQL to automatically add semicolons at the end of each statement if they are missing.
    While in most cases SQL Server 2005 and 2008 don't require this, the 2008 docs mention that a future version might.
    and it may also be helpful if trying to move code from SQL Server 200x to a dialect which does require them.

    85 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  4. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  5. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  6. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  7. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  8. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  9. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  10. When a --#TODO: or --#HACK is written on our code, it could be helpful to highlight it in order to give an alert to the reader. In addition it can be very helpful to let the user to configure the pattern (i.e. --#MyTerm).

    46 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  ·  Thomas Walsh responded

    We’ve released support for highlighting TODOs in version 9 of SQL Prompt as part of its new code analysis feature.

    You can get the latest version of SQL Prompt from https://www.red-gate.com/products/sql-development/sql-prompt/.

    We’re marking this request as completed, but if you feel strongly about being able to configure the term, please feel free to open a new suggestion.

    Kind regards,

    The Prompt Team

  11. Sample query (spaces marked with underscores):

    SELECTstaffId, staffName, a
    FROM
    __personnel

    SELECT and FROM have whitespace after them to align the rest of the statement. This formatting style is tedious to maintain and almost nowhere to be found in real codebases or on the web. Please support the more common code style:

    SELECTstaffId, staffName, a
    FROM
    personnel

    Just one space.

    41 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)
  12. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  13. Allow users to specify how CTEs should be formatted. Right now I get:

    WITH cte
    AS (
    SELECT
    Title
    ,FirstName
    ,LastName
    FROM
    isales.dbo.salesteam
    )
    SELECT
    Title
    ,FirstName
    ,LastName
    FROM
    cte

    What I would like is:

    WITH cte
    AS
    (
    SELECT
    Title
    ,FirstName
    ,LastName
    FROM
    MyTable
    )
    SELECT
    Title
    ,FirstName
    ,LastName
    FROM
    cte

    26 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. It would be nice to get a warning on delete or update statements if you did not specify a where clause.

    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

    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)
  15. When an IF is short and does not have a BEGIN END on it, have it format to a single line.

    Right now if you have

    IF @Parameter1 = 0
    RETURN -1
    IF @Parameter2 = 0
    RETURN -2

    I would like it to be:

    IF @Parameter1 = 0 RETURN -1
    IF @Parameter2 = 0 RETURN -2

    which would make it more compact.

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

    This feature was released in version 8 of SQL Prompt.

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

    Kind Regards,
    The Prompt Team

  16. When copying a list of items from something like Excel, it would be lovely to have a feature in Prompt which would highlight the list, hit a key stroke and it would place quotes around each item and a comma after them.

    It would stop me bashing the quote + arrow + comma keys at the speed of light.

    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

    9 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. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  18. Allow the option to NOT indent else if statements. Each of the ELSE IF statements gets further indented and for large SQL it becomes indented off the screen. I can imagine this pattern could apply else where but for this specific use case our STPs that have this condition i simply can't format the sql because it requires me to horizontally scroll. Allowing me to disable indenting ELSE IF statements would solve this problem instantly.

    21 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)
  19. Frequently I need to debug application generated SQL obtained via Profiler. Parameterized queries are often implemented with sp_executesql.

    I love using Format SQL to make a single line monster query into something I can actually read. But when it's stuck in an spexecutesql call the format function doesn't touch it. I have to:
    Remove "Exec sp
    executesql".
    Remove the apostrophes around the query SQL. For big queries this is really painful, especially if the query itself contains apostrophes.
    Remove the apostrophes around the parameter defenitions.
    Move the parameter definitions to the top and add a DECLARE.
    Move the parameter…

    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

    7 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

  20. 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 →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
← Previous 1 3 4
  • Don't see your idea?