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 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)
  2. 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)
  3. 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

  4. When the WITH clause is specified in the FROM clause on a JOIN, Format SQL pushes the join condition out to the WITH.
    Like this:
    FROM
    TableA WITH (NOLOCK)
    JOIN TableB WITH (NOLOCK)
    ON TableA.ID = TableB.ID

    I would like it to behave like it does when the WITH is not present

    FROM
    TableA WITH (NOLOCK)
    JOIN TableB WITH (NOLOCK)
    ON TableA.ID = TableB.ID

    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

    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)
  5. 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 →
    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 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)
  7. 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)
  8. I believe the DISTINCT keyword should remain on SELECT line but at least maintain the indentation please. Thanks

    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)
  9. 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)
  10. Currently when formatting a Create table command the SQL Prompt is moving the "Default" to a next line and indenting it...
    like this
    [insertDT] DATETIME NULL
    [______INDENT] DEFAULT GETDATE()
    ,[ActualMU] INT NULL
    [
    ___INDENT]DEFAULT 0
    ,[PlannedMu] INT NULL
    [
    ___INDENT]DEFAULT 0
    ,[CompletedDT] DATETIME NULL
    [
    ___INDENT___] DEFAULT GETDATE()

    And the format that I would like to see (making easier to read) is
    keeping all definition of each field in the same line, like

    ,[insertDT] DATETIME NULL DEFAULT GETDATE()
    ,[ActualMU] INT NULL DEFAULT 0
    ,[PlannedMu] INT NULL DEFAULT 0
    ,[CompletedDT] DATETIME NULL DEFAULT…

    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

    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

  11. When a word is entered in a comment block, that is the same as a keyword (e.g. FROM), SQL Prompt should not automatically convert the word to uppercase.

    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

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

    We're glad you're here

    Please sign in to leave feedback

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

  15. It would be nice if one could click a button and get the AS keyword between an object name and its alias. This would help with code that doesn't use AS to separate the two. And would also help readability.

    Thanks.

    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

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

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

    We're glad you're here

    Please sign in to leave feedback

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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  19. Please provide the option to format IF statements as follows, based on the format settings sample.

    IF @productType IN ('a', 'b', 'd', 'g', 'i', 'O', 'Q', 'X', 'Z') BEGIN

    ----IF @cost <= @compareprice BEGIN

    --------PRINT 'Less than $' + CAST(@compareprice AS varchar(20))

    ----END ELSE BEGIN

    --------PRINT 'Exceeds $' + CAST(@compareprice AS varchar(20))

    ----END

    END

    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

    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)
  20. When formatting SQL, add an option to force all possible columns/objects/whatever to be qualified with square brackets. So:

    CREATE TABLE #qqqqq (aaaaa INT,bbbbb INT,ccccc VARCHAR(5));
    Becomes: CREATE TABLE [#qqqqq] ([aaaaa] INT,[bbbbb] INT,[ccccc] VARCHAR(5));
    Or: CREATE TABLE [#qqqqq] ([aaaaa] [INT],[bbbbb] [INT],[ccccc] [VARCHAR](5));

    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)
  • Don't see your idea?