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. The SQL Prompt formatter incorrectly tries to capitalize (whether automatically while I type or using the formatter) system functions that are missing a database prefix. For example, SQL Prompt doesn't try to capitalize:

    sys.fn_listextendedproperty

    but it WILL capitalize

    fn_listextendedproperty

    as soon as I hit space, regardless of the CASE setting in SQL Prompt's options. Obvious, a capitalized FN_LISTEXTENDEDPROPERTY does not work: the function is case-sensitive.

    There does not appear to be a way around this, not even by setting Format -> Styles -> Case -> Buit-in functions to "Leave as is". That only resolves the problem for the manual formatter:…

    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

    This is fixed in the latest build of Prompt, if you’re still having problems please let me know.

  2. Often when I'm debugging code that dynamically generates SQL, I hit a breakpoint, then copy the code into an SSMS query window. All the code is typically in a single long line. I can then use SQLPrompt to format the code to read it, and potentially change it to correct errors. However, what I then often want to do is to paste the changed code back into the variable (or whatever). I'd love to be able to have an option to format the code all into a single line.

    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

    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. Case formatting to allow option of capitalising initial letter only - e.g. Select, not SELECT or select.

    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

    The latest version of Prompt has the casing option UpperCamelCase which will case SELECT as Select.

  4. It would great if there was an un-format SQL command, which would basically un-format the SQL by removing all the carriage returns, tabs, extra spaces, etc. I know it seems odd, but we have several applications that use the SQL via external files, so the formatting will not work, and we end up manually removing all the formatting.

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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  5. 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)
  6. 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

  7. Provide an option to not indent the FROM and WHERE clauses to remain them lined up with the SELECT clause while maintaining a single space after each clause.

    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)
  8. 2012 keywords like LEAD( LAG( etc.

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

    We’ve released SQL Prompt 6 which includes support for 2012 analytic functions (LEAD, LAG, CUME_DIST, etc)

  9. We need the ability to quickly switch between T-SQL Formatting styles.

    I work on a team where everyone likes code formatted differently. Also, we're required to use a specific format before checking SQL Code into TFS. I need a quick way to switch between styles so I can code in a format I like and then switch to our standard before check-in. Toad already offers this.

    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)
  10. I really like how SQLPrompt assists with Insert Statements. However, I am then left with a large list of comments which I'm not allowed to check into source control. Therefore, I have to manually delete each line of comments.

    Example:
    Insert into Blah blah..

    VALUES ('', -- fenumber - char(3)
    '', -- finumber - char(3)
    '', -- fpartno - char(25) )

    When I enter the values, I want to be able to auto-eliminate the comments.

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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  11. Have a function which is the opposite to 'Format SQL' so you can select a section of text and have all the Line Breaks and padding taken out. Currently I use HTML Shrinker Pro to do this, but it would be nice to select a block and one line it eg..
    @DateAppointed = CASE WHEN LEN(DateAppointed)> 1 THEN DateAppointed ELSE @Unknown END ,

    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)
  12. SELECT Number1
    ,Number2
    ,Number3
    FROM table r
    JOIN table2 tf
    ON r.column = tf.column
    AND r.column = 0
    WHERE column = 0
    AND column1 = 2

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

  13. 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)
  14. 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)
  15. Currently, no matter what settings are applied, table names are always placed on a new line, for example:

    SELECT
    ID,
    Thing

    FROM
    TableName

    JOIN
    OtherTableName
    ON blah=moo

    WHERE
    something <> something else

    My personal preference is for:

    SELECT
    ID,
    Thing

    FROM TableName

    JOIN OtherTableName
    ON blah=moo

    WHERE something <> something else

    Please can we have an option to achieve table names on the same line as their action (FROM / JOIN)

    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

    11 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. sequences in sql 2012 is not supported by the formatter

    anywhere in the script file if the last line below is used it causes an error.

    CREATE SEQUENCE [dbo].[ReportComparisonSeq] AS INT START WITH 1 INCREMENT BY 1 NO CYCLE CACHE 10
    go
    DECLARE @Seq INT
    SELECT @Seq = NEXT VALUE FOR [dbo].[ReportComparisonSeq]

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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  17. Formatting a section (selected code block) with CTRL+K, CTRL+Y). This would allow me to highlight a section of a proc and format it to my liking and leave the (abomination) of the proc body untouched.

    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  ·  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. I would like an option to align the type declarations, for example when declaring the columns in a table variable I currently get:
    DECLARE @MyExample TABLE
    (
    MyCol1 INT ,
    MyOtherCol VARCHAR(10)
    )

    Which I would quite like to see laid out as:
    DECLARE @MyExample TABLE
    (
    MyCol1 INT ,
    MyOtherCol VARCHAR(10)
    )

    The same is true for all other places where I'm declaring, so the parameters for a procedure for example

    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

    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)
  19. 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)
  20. I would like the ability to get Format SQL to handle my JOIN formatting - I like to have my JOINs look like this:

    SELECT
    (columns)
    FROM
    sys.tables t
    INNER JOIN
    sys.indexes i ON t.OBJECTID = i.objectid

    That is: I want to have my tables being joined lined up with the (intended) table in the FROM clause, and I like to have my JOIN condition on the same line as the joined table.

    Right now, I cannot seem to get this to work - the table name and join condition are always stuck onto the same line as…

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

  • Don't see your idea?