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 at http://www.red-gate.com/messageboard/viewforum.php?f=169.

How can we improve SQL Prompt?

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Add brackets as an alias = option

    The alias options in SQL Prompt 7.3 are:
    - column as alias
    - column as 'alias'
    - column alias
    - column 'alias'
    - alias = column
    - 'alias' = column

    There is no

    - [alias] = column

    In additon, the single quotes are deprecated, so these should be removed.

    1 vote
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      0 comments  ·  Flag idea as inappropriate…  ·  Admin →
    • feature to fix Aliasing using “=” versus “as”

      Using ‘=’ isn't valid means to alias in ANSI SQL. Most people find using proper not readable but SQLPrompt could format the SQL so that it is readable. See the following example:

      `select
      alias1 = somecolumn,
      alias2 = anothercolumn,
      result = column1 * column2
      from
      table
      ....`

      select
      somecolumn as alias1,
      anothercolumn as alias2,
      column1 * column2 as result
      from
      tables
      ...

      1 vote
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
      • installing a newer ssms

        When installing/added a newer version of ssms (eg sql2014) it would be nice for the existing plugins (eg ToolBelt) to be found in the newer SSMS, and so not having to run the install again, which often means loosing all the hot fixes in the previous SSMS install and for the new one the error messages that you have installed this more than once.
        If this was a visual studio product, you would just supply a vsix file or a Toolbox refresher exe.

        3 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          0 comments  ·  Flag idea as inappropriate…  ·  Admin →
        • Create new Setting to only enclose SQL Keywords in square brackets

          I don't want to use brackets for my code (unless I have to). So, for example, dbo.Orders is fine, but dbo.Order isn't. It would be nice if SQL prompt caught this and automatically enclosed the SQL Keyword "Order" in square brackets (i.e. dbo.[Order] AS o)

          1 vote
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
          • 1 vote
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              I agree to the terms of service
              Signed in as (Sign out)
              You have left! (?) (thinking…)
              0 comments  ·  Flag idea as inappropriate…  ·  Admin →
            • Match Visual Studio Themes

              Visual Studio supports a Dark theme however Prompt doesn't match and still displays the standard white for suggestions.

              3 votes
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service
                Signed in as (Sign out)
                You have left! (?) (thinking…)
                0 comments  ·  Flag idea as inappropriate…  ·  Admin →
              • Subquery to CTE

                When optimizing new Views or queries.
                I normally like to review the possible performance with Subquery to CTE, but requires lots of rewriting of the query. CTE also make great refactoring for TSQL statements.

                The SQL format could produce subquery to CTE from this site for example.
                http://www.sqlservercentral.com/articles/Stairway+Series/122606/

                Possible interface optimization would be find sub queries or CTE that are used over and over again, and suggest a new views for that query when feasible to do so.

                3 votes
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                • Open in Excel - option to copy nulls as blank cells instead of empty string

                  Please consider adding an option to bring over open in Excel null values as empty cells or instead of empty strings - excel considers empty string a 'value' in aggregate functions but ignores empty cells

                  7 votes
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    0 comments  ·  User interface  ·  Flag idea as inappropriate…  ·  Admin →
                  • Index-based Column & Grouping Suggestions

                    Good database design would suggest thoughtful indexes are in place on tables based on expected usage. It seems like this thoughtful index creation could be utilized to simplify and encourage good select/grouping behavior in queries to maximize index utilization by the database engine.

                    As such, having index names show up in intellisense suggestions for column lists in the SELECT and GROUP BY statements of a query, which then expand to the columns included in those indexes, would be extremely helpful.

                    Presumably with the "Included" columns in SQL Server indexes, including only the indexed columns in the GROUP BY column and…

                    3 votes
                    Vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      I agree to the terms of service
                      Signed in as (Sign out)
                      You have left! (?) (thinking…)
                      0 comments  ·  Intellisense  ·  Flag idea as inappropriate…  ·  Admin →
                    • Support Server Triggers

                      Currently, Intellisense does not include server triggers, e.g. RG_SQLLighthouse_DDLTrigger. It should. Otherwise, finding and getting the definition for those objects requires querying sys.server_triggers and sys.server_sql_modules manually.

                      3 votes
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        0 comments  ·  Intellisense  ·  Flag idea as inappropriate…  ·  Admin →
                      • Comment Word Wrap

                        Hi!

                        I would be nice to have the option to enable word wrap for the comments as well.
                        The number of maximum characters for the comment should be aligned with "Wrap lines longer than" for SQL statements.

                        9 votes
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service
                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                          0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                        • Bookmarks

                          Bookmarks is a feature of SSMS. But all my bookmarks are destroyed once the code is formatted. So, as SSMS' feature is not so good as I want I do suggest to implement this feature by RedGate.

                          1 vote
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            I agree to the terms of service
                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            0 comments  ·  User interface  ·  Flag idea as inappropriate…  ·  Admin →
                          • Results Information

                            It would be great to see a log of the execution data for each tab (when executed/# of rows in result set/execution run time/etc). I would love to be able to be able to use that data for tracking/comparison as I'm working on a new script/making adjustments to old script/trying to optimize something.

                            I would love to be able to answer questions like "Did my changes optimize the run time?", "Have my row counts been consistently the same?" without having to manually keep track of everything.

                            3 votes
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              I agree to the terms of service
                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                              0 comments  ·  User interface  ·  Flag idea as inappropriate…  ·  Admin →
                            • Formatting SQL in case of using openxml

                              Hi!
                              The Statements of the with clause in a openxml Statement are not formatted. For example

                              -- Create an internal representation of the XML document.
                              EXEC [sp_xml_preparedocument]
                              @DocHandle OUTPUT
                              ,@XmlDocument
                              ,'<PerfectService xmlns:ps="http://www.perfect.com/NS/PS"/>';

                              -- Execute a SELECT statement using OPENXML rowset provider.
                              SELECT *
                              FROM OPENXML (@DocHandle, '/ps:PerfectService/ps:body/ps:perfectReporting/ps:View/ps:rows/ps:row',1)
                              WITH (
                              --[name] VARCHAR(64) './@name'
                              [name] VARCHAR(64) '../../ps:keys/ps:name/.',
                              [date] DATE'../../ps:keys/ps:date/.' ,
                              [book] INT '../../ps:keys/ps:book/.',
                              [rowLevel] FLOAT './ps:cell[@name="rowLevel"]/.'
                              ,[requestID] NVARCHAR(255) './ps:cell[@name="requestID"]/.'
                              ,[reportingCcy] NVARCHAR(3) './ps:cell[@name="reportingCcy"]/.'
                              ,[valCcy] NVARCHAR(40) './ps:cell[@name="valCcy"]/.'
                              ,[baseproduct] NVARCHAR(40) './ps:cell[@name="baseproduct"]/.'
                              ,[product] NVARCHAR(40) './ps:cell[@name="product"]/.'
                              ,[instrument] NVARCHAR(40) './ps:cell[@name="instrument"]/.'
                              ,[instrument_descriptor] NVARCHAR(255) './ps:cell[@name="instrument_descriptor"]/.'
                              ,[instrument_Isin] NVARCHAR(50) './ps:cell[@name="instrument_Isin"]/.'
                              ,[varrf] NVARCHAR(40) './ps:cell[@name="varrf"]/.'
                              ,[rf] NVARCHAR(40)'./ps:cell[@name="rf"]/.'
                              ,[instrument_npv] FLOAT './ps:cell[@name="instrument_npv"]/.'
                              ,[delta] FLOAT'./ps:cell[@name="delta"]/.' …

                              2 votes
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                I agree to the terms of service
                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                                0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                              • Format SQL in Visual Studio (C #, etc)

                                In my VS tab:

                                1. I want to highlight a string variable assignment contain a SQL statement, run Format SQL from the SQL Prompt menu in Visual Studio and have it output a multiline statement in the appropriate language for the file (aspx, cs, etc).

                                Start with:
                                string sql = "SELECT o.name,
                                c.name
                                FROM sys.objects AS o
                                INNER JOIN sys.columns AS c
                                ON o.object_id = c.object_id;"

                                format it into:

                                string sql = "SELECT o.name,"
                                sql += "c.name"
                                sql += "FROM sys.objects AS o"
                                sql += "INNER JOIN sys.columns AS c"
                                sql += "ON o.object_id = c.object_id;"

                                2. I want to…

                                2 votes
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  I agree to the terms of service
                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                  0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                                • CONVERT () - style parameter

                                  It would be very nice when you could list suggestions for the third style parameter of the CONVERT / TRY_CONVERT-function (see https://msdn.microsoft.com/en-us/library/ms187928.aspx), similar you did it for the object type parameter in OBJECT_ID(), because I'm very tired to open the MS documentation every few days.

                                  It would be nice, if you could make it specific to the data type (first or (!) second parameter e.g. a date/time or a float or xml), but because this could be hard (when using functions or a CASE) it would be sufficient to list them in the order as on the MS-Page (date-styles…

                                  3 votes
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    I agree to the terms of service
                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                    0 comments  ·  Intellisense  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Format statement or batch when delimiter is enetered

                                    An option enabling automatic statement and/or batch formatting when a statement delimiter or batch delimiter is keyed in would be very helpful.

                                    This is one of the very few features I miss after moving to SQL Prompt from SQLComplete.

                                    2 votes
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      I agree to the terms of service
                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                      0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Format when code is pasted into document

                                      An option to enable automatic formatting when code is pasted into a document would be great.

                                      6 votes
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        I agree to the terms of service
                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                        0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Please make this work in harmony with SSMS tools

                                        I work in an environment where we have 200+ databases. Using SSMS Tools you are able to "run on multiple databases" which is perfect for implementing the same script across all 200 databases.
                                        The problem comes when SQL Prompt tries to then pre-cache all 200 databases even though I have no intention of typing anything I just want the script to run as is.

                                        3 votes
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          I agree to the terms of service
                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                          1 comment  ·  Intellisense  ·  Flag idea as inappropriate…  ·  Admin →
                                        • RTRIM, Tabs and line breaks

                                          It would be nice to have a function that are called from this Control-Key menu (plus the default SQL Prompt menu) and does the following to the selected (or complete, if nothing is selected) text:

                                          - RTRIM every line
                                          - replace tabs by spaces (not always 4; only until <currentColumn>% 4 = 0)
                                          - converts char(10) to char(13) + char(10) (when there is no char(13) before)

                                          Because I'm not the only user, the second step could convert spaces to TABs too (depending on the SSMS options) and the third step could remove char(13), if someone wants to use the SQL…

                                          4 votes
                                          Vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            I agree to the terms of service
                                            Signed in as (Sign out)
                                            You have left! (?) (thinking…)
                                            0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1 3 4 5 29 30
                                          • Don't see your idea?

                                          Feedback and Knowledge Base