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. Please add support for new SQL Functions such as DATE_BUCKET
    https://learn.microsoft.com/en-us/sql/t-sql/functions/date-bucket-transact-sql?view=sql-server-ver16

    Currently it get quoted which is quite inconvenient.

    declare @date datetime2 = '2020-04-30 21:21:21'
    Select 'Week',  DATE_BUCKET(WEEK, 1, @date)
    Union All
    Select 'Day',  DATE_BUCKET(DAY, 1, @date)
    Union All
    Select 'Hour',  DATE_BUCKET(HOUR, 1, @date)
    Union All
    Select 'Minutes',  DATE_BUCKET(MINUTE, 1, @date)
    Union All
    Select 'Seconds',  DATE_BUCKET(SECOND, 1, @date);
    

    becomes

    DECLARE @date DATETIME2 = '2020-04-30 21:21:21';
    SELECT   'Week', [DATE_BUCKET] ( [WEEK], 1, @date )
    UNION ALL
    SELECT   'Day', [DATE_BUCKET] ( [DAY], 1, @date )
    UNION ALL
    SELECT   'Hour', [DATE_BUCKET] ( [HOUR], 1, @date )
    UNION ALL
    SELECT   'Minutes', [DATE_BUCKET] ( [MINUTE],
    2 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. The formatter is not recognizing the newish DateTrunc function in T-SQL, so formatting and intellisense do not work on SQL statements that include DateTrunc.

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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  3. CREATE EXTERNAL TABLE and CREATE EXTERNAL DATA SOURCE syntax is not formatted nicely by SQL Prompt, it just puts the statements on one line.

    I've been told the developers are not going to take this on!!!!

    2 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)
  4. 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)
  5. 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)
  6. Very often i have copied a list of items i want to query in an IN() statement from the database, for example:

    abc
    def
    ghi
    jkl

    and I want to format it like this:

    'abc'
    'def'
    'ghi'
    'jkl'

    or better yet:

    'abc'
    

    , 'def'
    , 'ghi'
    , 'jkl'

    Being able to highlight, right click, and select an option do do this, would be incredibly helpful.

    2 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  ·  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)
  7. It would be nice to have the code within a BEGIN TRAN and COMMIT be indented.

    BEGIN TRAN
    <ssss>INSERT....
    <ssss>UPDATE....
    COMMIT TRAN

    6 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. 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)
  9. When using OPENJSON with the WITH clause, the formatter does not recognize the WITH clause as valid SQL. This should format but throws an error:

    DECLARE @JSONString NVARCHAR(MAX) SET @JSONString = N'{"Vendors":[{"VendorNumber":200,"VendorName":"Vendor1"},{"VendorNumber":201,"Vendo2"},{"VendorNumber":202,"VendorName":"Vendor3"}]}'

    SELECT VendorNumber ,
    VendorName
    FROM OPENJSON(@JSONString, '$.Vendors')
    WITH (VendorNumber INT '$.VendorNumber', VendorName VARCHAR(50) '$.VendorName')

    2 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)
  10. In SQL Server 2016 it is now possible to calculate between timezones. Currently it gives me an error, when I want to format it. The syntax is also not allowed at the moment.

    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)
  11. I used to be able to format selected code, as long as it was valid. Now when I select code that is valid in a larger script that has invalid code it does not format the selected code at all. If the invalid code immediately precedes it it will suggest that there is an error in the first character of my selection when there is none, else it will just act like it did something but do nothing. This used to work and is a frustration now. This has been the case with both 7.3 betas and I believe at…

    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

    completed  ·  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. SQL server 2016 SP1 introduced the "CREATE OR ALTER" PROCEDURE/VIEW - syntax, which would be very nice to have support for.

    https://support.microsoft.com/en-us/kb/3190548

    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)
    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. Looks like version 7.3 of SQLPrompt removes all blank lines after the query that it formats. Please change this back or make it optional to delete blank lines at the bottom of the query.

    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)
  14. 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)
  15. Sometimes, formatting makes a query less readable, e.g.

    insert table (col1, col2, col3, ....)
    values (1,2,3,...),
    (11,12,13,...),
    ...

    Formatting will put the values on multiple lines if there are enough of them. It's easier to see the data when they are on one line. So how about:

    --#region [optional description] #SQLPromptIgnore
    --anything in here doesn't get formatted
    --#endregion [optional description]

    Not sure what would be best for '#SQLPromptIgnore'

    2 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. I love to have the options so that the first line of a stored proc is just the name i.e. create proc spName and the @parms varchar(20) and following would be on additional lines
    So for example

    create proc spName
    @Parm1 int
    ,@Parm2 int

    thanks
    Shannon

    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 →
    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

  17. 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)
  18. SQLPrompt will take scientific notation, and alias it as 1[e1], 1[e2] and so on.

    1e1
    1e2
    1e3
    1e4
    1e5
    1e6
    1e7
    1e8
    1e9

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

    Hi Erik,

    Thanks for letting us know about this issue. It should now be fixed in the latest build of SQL Prompt (7.1.0.314)

  19. 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)
  20. When you have a nested inner join to an outer join, such as:

    SELECT a., b., c.*
    FROM
    A a
    LEFT JOIN B b
    INNER JOIN C c on b.bid = c.bid
    ON a.aid = b.aid

    It should allow an option to indent the nested join further to show that it is nested

    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)
← Previous 1 3 4
  • Don't see your idea?