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

276 results found

  1. Oftentimes when I am writing queries, the results from one column of one query are quickly needed in my next one in an IN clause. I highlight the column of values from the results grid and paste into the query window, and then have to append commas (and for neatness, I delete the line breaks). I would be nice to have an added option the context-menu of the results grid to add a copy as comma separated list (in addition to the current copy and copy with headers options).

    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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  2. Place semi-colon on new line.

    I frequently format my statements as I'm developing them, but multiple times now I've started to add an Order By or some other clause after the auto-inserted semi-colon. I would like to see an option to place the semicolon on the line following the sql statement rather than directly after. This would enable me to start typing at the start of the next line without having to check if a semicolon had been added to the preceding line.

    Example:
    Select * From Table
    Where A = 1; -- Semicolon added by formatting
    Order By A

    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

    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. Can you add "choose style" or "switch style" to the commands section, as a drop down, so that it can be added to the SQL PROMPT toolbar? Or possibly as a hot key menu option?

    I switch styles often. There's the style I like to work in, a style suited for debugging, and the style that management likes the code to be posted with (in TFS.) Being able to switch between them is very helpful. but, going to SQL Prompt --> Options --> Styles --> Selecting Style "with the mouse" is time consuming.

    Thanks for your consideration!

    Lawrence Barnes

    10 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

    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 quick switching of active styles in version 8 of SQL Prompt. You can right click in the editor window, select `Active Style` and then choose the style you want to switch to.

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

    If you are still keen to have this functionality available via a hotkey, please let us know by opening a new suggestion.

    Kind regards,

    The Prompt Team

  4. SELECT
    *
    FROM
    Temp1

    --Remove this kind of extra spacing between statements option is Needed
    

    SELECT
    *
    FROM
    Temp2

    --Remove this kind of extra spacing between statements option is Needed
    

    SELECT
    *
    FROM
    Temp3

    10 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)
  5. It would be nice to have a TRY CATCH snippet.

    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

    1 comment  ·  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. If a table variable or temp table has an identity field, I do not think this field should show up in the auto generated insert into/values list:

    DECLARE @Table TABLE (TableId INT IDENTITY(1,1), Data VARCHAR(100);

    INSERT INTO @Table
    ( [TableId] -- This field show not show up by default in the insert list
    , [Data] )
    VALUES ( 0 -- TableId - int -> This field show not show up by default in the insert values list
    , '' -- Data - varchar(100)
    )

    -- Temp Table
    CREATE TABLE #Temp (TableId INT IDENTITY(1,1), Data1);

    INSERT INTO [#Temp] ([TableId],
    [Data1]) VALUES…

    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  ·  Tab history  ·  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. when creating a WHERE colname IN ('a','b','c')

    it would be nice if you could paste a set of rows from excel into SSMS and then add the quotation marks and commas

    i.e.

    A
    B
    C

    becomes

    'A',
    'B',
    'C'

    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)
  8. Hi,

    Is it possible to format below code

    DECLARE @a VARCHAR(200);
    SELECT @a = 'asdf';
    DECLARE @b NVARCHAR(200);
    SELECT @b = 'asdf';

    to

    DECLARE @a VARCHAR(200);
    SELECT @a = 'asdf';
    DECLARE @b NVARCHAR(200);
    SELECT @b = N'asdf';

    Thanks.

    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

    1 comment  ·  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

    Hello,

    We have added this feature in SQL Prompt 9.1.4.4532
    It can be found under Prompt → Options → Style

    It currently only works with variable assignments for variables declared in the same script.

    If you would like to see us expand this more please let us know by creating a new idea.

    Kind Regards,
    The Prompt Team

  9. This is an old problem that just won't go away.

    The Red Gate toolbar that holds the SQL Prompt icons (Tab History, Add-ins, SQL Test, SQL Search) will not persist it's state in SSMS. You can move it, but it comes back to the same place on it's own row. You can delete it, but it comes back again.

    Recommend (a) making the toolbar's state persistent in SSMS and (b) added a feature to the Options menu that allows the user to remove it.

    Using SQL Prompt 6.4.0.678 on SSMS 11.0.5058.0 (2012).

    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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  10. 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)
  11. I think I 've found a bug...
    If you Format this SQL

         DECLARE @Translations TABLE
            (
              [FundTypeId] INT NOT NULL ,
              [ColumnName] NVARCHAR(128) NULL ,
              [ColumnValue] NVARCHAR(256) NULL ,
              [InsertedAt] DATETIME NULL ,
              [InsertedBy] NVARCHAR(256) NULL ,
              [LastUpdatedAt] DATETIME NULL ,
              [LastUpdatedBy] NVARCHAR(256) NULL ,
              PRIMARY KEY ( [FundTypeId] )
            );
    
         SELECT *
         FROM   ( SELECT    [pt].[FundTypeId] ,
                            [pt].[FundType] ,
                            [pt].[Comment] ,
                            [pt].[InsertedAt] ,
                            [pt].[InsertedBy] ,
                            [pt].[LastUpdatedAt] ,
                            [pt].[LastUpdatedBy]
                  FROM      @Translations AS [tmp] PIVOT ( MAX([ColumnValue]) FOR [tmp].[ColumnName] IN ( [FundType], [Comment] ) ) AS [pt]
                ) AS [tmp];
    

    ... it will break the code as the MAX function of…

    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)
  12. It would be useful to add an option to decrypt encrypted stored procedures and display the decrypted SQL in a query tab.
    We often work with encrypted SP's on customer databases, but when there is a bug report, it is often hard to see what is going wrong.

    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

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

    This is already available in the latest SQL Prompt. It’s on by default but just to double check it’s enabled for you, there’s a checkbox at the bottom of the behavior page in the options named “Decrypt encrypted objects”.

    Thanks,
    Aaron.

  13. Would be useful if tab coloring supported wildcards
    eg *.sql = production
    *.dev = development etc

    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

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

    Wildcards are already supported for tab coloring in the latest version of Prompt. Just use a * for the wildcard in either the server or database column on the tab color options page. If you’re having any problems with this, please send me an email: aaron.law@red-gate.com

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

  15. Can you add a comment block /* */ to the Surround With choices? It would be of great use.

    I also like the idea of adding Surround With options to the snippet editor where one could specify the before and after.

    The example one person gave was Surround With ISNull( <highlighted column> ,0)

    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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  16. when selecting a particular table alias, can you highlight all places where that alias is being used like in notepad++

    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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  17. Currently if you type a query like this:

    select *
    from sys.objects o
    order by o.name d[CURSOR]

    the popup consists of dbcc, deallocate, declare, delete, deny, desc, disable trigger, drop, dump.

    While that is probably technically accurate, it would be much more helpful to make "desc" the first entry in the list, because it's what I'm typing 100% of the time.

    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

    1 comment  ·  Intellisense  ·  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. SQL XML is a great tool that gets very little support. When I am on an XML type variable...the intellisense isn't great....AT ALL. Doing something like:

    declare @xml XML;
    set @xml = '<Tests><Test><Id>1</Id></Test></Tests>';

    select @xml.value --This doesn't have intellisense. It will try to capitalize .value to .VALUE which isn't correct.

    So better SQL XML support would be nice.

    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

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

    In your example “value” will be suggested and left as lowercase in the latest version of Prompt 6. If you’re still having problems even on the latest version please contact support as you may have hit a bug.

    Thanks,
    Aaron.

  19. ;
    RECEIVE TOP(1)
    @h = conversationhandle,
    @t = message
    typename,
    @b = message
    body
    FROM SimpleQueueTarget

    From the Service Broker Workbench on Simple Talk.

    It only moves the semicolon to a separate line. No errors. Ignores "comma at start".

    And, yes, the @'s above probably start in column 1, when they're actually in col 5.

    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 8 of SQL Prompt.

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

    Kind Regards,
    The Prompt Team

  20. Using PIVOT the wrong alias is suggested in the intellisense window as it is the alias from the FROM clause, not the PIVOT clause that is displayed.

    The same goes for the auto complete, where field names is (automatically) prefixed with the wrong alias (I know this feature can be disabled...)

    Ex:[code]CREATE TABLE dbo.tbTest(
    Id INT,
    foo VARCHAR(3),
    bar FLOAT
    )
    GO
    INSERT INTO dbo.tbTest
    VALUES (1, 'foo', 2)
    , (2, 'bar', 3)
    , (3, 'foo', 4)
    GO
    SELECT *
    FROM (
    SELECT *
    FROM dbo.tbTest AS tt
    ) pvt
    PIVOT (
    MAX(bar) FOR foo IN ([foo], [bar])
    )p
    [/code]…

    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

    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?