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?

(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. Arrow keys + mouse on Tab History

    When using tab history it is very handy to use up and down arrow keys.

    The problem is when using arrow down and the mouse has been left over the list, Once bottom of the list has been reached; the scroll will start again from the mouses position and not just keep moving down from last arrow/highlighted position.

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

      We’ll send you updates on this idea

      0 comments  ·  Tab history  ·  Flag idea as inappropriate…  ·  Admin →
    • Align comment - not for outcommended code

      - I have a SELECT with some comments after the column aliases (e.g. in column 80)
      - I comment a line out
      - I let SQL Prompt format the statement
      -> the outcommented line will be moved to column 80 too, which makes it hard to find / read etc.

      Solution:
      - only align it when there is some regular SQL code before the comment (e.g. a column, table, condition ...)
      - or there are only whitespaces before the comment and it starts (roughly) equal as the comment one line above (multiline comments)
      - and / or do not align…

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

        We’ll send you updates on this idea

        0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
      • Option to disable Tab key from popping up suggestions

        I would like an option that can disable the tab key from popping up the suggestions menu/popup. When I am formatting my code in SSMS using the tab key to line up various items, each time I hit tab, the suggestions menu pops up.

        MOST of the time this isn't an issue other than ignoring the pop-up. Occasionally, based on what is in the code I am formatting, when I hit tab it will auto select an item in the suggestions, and the second tab will insert the suggestion. This slows me down quite a bit.

        In the mean time,…

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

          We’ll send you updates on this idea

          0 comments  ·  Intellisense  ·  Flag idea as inappropriate…  ·  Admin →
        • Subquery IN clause indentation doesn't work properly

          I've uploaded a sample query to Pastebin that demonstrates the issue: https://pastebin.com/0nJPWrvx

          My settings file is here: https://pastebin.com/iwb4QMYN

          I'd love it if you could fix two things about this.

          1) The indentation of the "NOT IN" clause on lines 17-18 is atrocious. The issue appears to be that it's aligning to the wrong SELECT statement.

          2) I want to wrap my subqueries with more whitespace. I think adding an option to indent the subquery on dedicated lines would work, and the result would look like they're nested in curly braces like you might see in scripting languages or C#. The…

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

            We’ll send you updates on this idea

            0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
          • Filter Tab History by Server name or Database Name

            It would be super useful to be able to filter the tab history modal by Server name, Database name or both.

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

              We’ll send you updates on this idea

              0 comments  ·  User interface  ·  Flag idea as inappropriate…  ·  Admin →
            • The group by option for all non-aggregate columns seems to get the columns from the select portion of the statement, including the function

              The group by option for all non-aggregate columns seems to get the columns from the select portion of the statement, including the function wrapping.

              I love this feature and would like have one additional context function called 'peel' or 'isolate' which removes all the function/formatting/whatever around a column and leaves the column.

              for example

              this:

              GROUP BY ISNULL(column1, '') ,
              ISNULL(column2, '') ,
              ISNULL(column3, '') ,
              ISNULL(column4, '0') ,
              ISNULL(column5, '') ,
              column6 ,
              column7

              becomes:

              GROUP BY column1 ,
              column2 ,
              column3 ,
              column4 ,
              column5 ,
              column6 ,
              column7

              Thanks,
              Erin

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

                We’ll send you updates on this idea

                0 comments  ·  User interface  ·  Flag idea as inappropriate…  ·  Admin →
              • keywords in subqueries to have different casing

                Hi - i've seen that you have a section just for subqueries. could it be possible to have an option to allow subqueries to be formatted with lower case?

                for example i like to have my code look like this

                SELECT TOP 100
                a.AuditLoadID,
                a.LoadDescription,
                a.LoadStatus,
                a.LoadStartDate,
                a.LoadEndDate,
                a.LoadMessage
                FROM
                [admin].AuditLoad AS a
                WHERE
                a.LoadStartDate = (select max(LoadStartDate)
                from [admin].AuditLoad a2
                where AuditLoadID < 100)

                cheers,
                ben

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

                  We’ll send you updates on this idea

                  0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                • Generate WITH RESULT SETS for Stored Proc

                  Create a way for a user to be able to highlight an EXEC stored proc statement and right click on it and have the option to 'Generate WITH RESULT SETS' statement for that stored proc. You would need to be able to have the statement highlighted so that you could determine the result set(s) that would be generated for the specific parameters being passed into that specific EXEC statement.

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

                    We’ll send you updates on this idea

                    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                  • SQL Prompt Bug For Extended Events Commands

                    When you format SQL containing commands like

                    ALTER EVENT SESSION X ON SERVER STATE = START

                    or

                    ALTER EVENT SESSION X ON SERVER STATE = STOP

                    SQL Prompy attempts to put semicolons after SERVER in both commands:

                    ALTER EVENT SESSION Locks ON SERVER; STATE = START
                    ALTER EVENT SESSION Locks ON SERVER; STATE = STOP

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

                      We’ll send you updates on this idea

                      0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                    • more options for column as 'alias'

                      Hi RG - using the latest sql prompt. its really good but could I request two enhancements please.

                      1. on the casing can we separate the 'as' keyword from the others. i.e. "SELECT", "FROM" etc have one rule applied but "AS" can be set separately (i like to have all my 'as' statements in lower case)

                      2. could there be an option to add a column as 'alias' to every column in a SELECT statement (defaulting to the column name). This would do the donkey work and then the sql developer could go and add in friendly names afterwards using…

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

                        We’ll send you updates on this idea

                        2 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                      • Highlight previous selection

                        Often when testing a SQL statement I highlight a subquery / block of code and execute it. If I make changes to the selected code I have to again reselect the code and run it. This can be annoying if the code is very long and I navigate away from the selected code.

                        What would be good would be to hit a shortcut to automatically highlight the previous start and end cursor position before the last execution.

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

                          We’ll send you updates on this idea

                          0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                        • Sort expanded selection as an option

                          Have an option to sort the field list alphabetically when expanding the *

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

                            We’ll send you updates on this idea

                            0 comments  ·  Expand wildcards  ·  Flag idea as inappropriate…  ·  Admin →
                          • Format SQL in a folder

                            It would be great if there was a feature where we would be possible format an entire folder instead of file by file.

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

                              We’ll send you updates on this idea

                              0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                            • Keyboard shortcut for Unformat

                              A keyboard shortcut for Unformat. I find that I format code with the SQL Prompt's "Format SQL" but there are always pieces of code that I want to unformat into a single line, and the keyboard would be faster than using the mouse to scroll and select the option (Or the Ctrl, U, down arrow, Enter keys).

                              In fact the ability to assign keyboard shortcuts to the items in that list (have no idea what you call the dialog bubble menu) would be even better.

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

                                We’ll send you updates on this idea

                                0 comments  ·  User interface  ·  Flag idea as inappropriate…  ·  Admin →
                              • Bulk Format

                                In the Object Explorer window when viewing stored procedures/views/functions etc, I think it would be really useful to be able to select multiple objects and have a context menu option that would generate formatted ALTER scripts, thus allowing somebody to update all T-SQL into the desired format.

                                Currently, when you have multiple objects selected you are unable to use the "Script xx as - ALTER to" option meaning you would have to either use the CREATE to option and amend to an ALTER, or use the DROP and CREATE to option, which would remove any permissions set against the object.

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

                                  We’ll send you updates on this idea

                                  1 comment  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                                • Select content of a block comment

                                  I will often use a block comment /* */ around code in the current script that I don't want to execute by default when I press F5. To execute the code in the block comment, I must select the content of the block comment and press F5.

                                  This is inefficient with the keyboard for comment blocks that are many lines of code: Locate the top of block comment, hold SHIFT, DOWN-DOWN-DOWN-etc..., F5)

                                  My suggestion is to allow CTRL-A (or similar) to select the content of the block content that the cursor is currently in. Followed by F5, this would execute…

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

                                    We’ll send you updates on this idea

                                    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                  • More options for lists in Format SQL

                                    separate options for formatting different types of lists, which are currently all formatted with the same settings:
                                    * parameters when defining a function
                                    * parameters when calling a function
                                    * select
                                    * insert column list

                                    Option to always put a newline after a multi-line case statement. e.g.
                                    select o.name, o.object_id, o.principal_id, o.schema_id, o.parent_object_id, o.type, o.type_desc
                                    , friendly_object_type = case o.type
                                    when 'S' then 'system table'
                                    when 'D' then 'default'
                                    when 'V' then 'view'
                                    end
                                    , o.create_date, o.modify_date, o.is_ms_shipped, o.is_published, o.is_schema_published
                                    from sys.objects o
                                    order by friendly_object_type

                                    instead of

                                    select o.name, o.object_id, o.principal_id, o.schema_id, o.parent_object_id, o.type, o.type_desc
                                    , friendly_object_type = case…

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

                                      We’ll send you updates on this idea

                                      0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Add option to default time to either UTC or local when expanding parameter lists.

                                      I would like to see an option to default times to either UTC or local time when expanding stored procedure parameter lists. Many larger companies are distributed across time zones and use UTC rather than local time but the vastly more numerous smaller organizations operating in a single location, generally use local time. Having to manually edit all the times in a parameter list somewhat limits the value of default values.

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

                                        We’ll send you updates on this idea

                                        0 comments  ·  Intellisense  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Align parameter assignments in sproc calls

                                        There is a lot of excellent alignment logic in the SQL Prompt formatting tool but we notice it is not implemented on parameter assignments in sproc calls. For example, in the statement below we think it would look better and be easier to read if all the equal signs were aligned as is done in DECLARE and other statement types.

                                        exec @errorNo = dbo.pPersonMailingAddress#Update
                                        @PersonMailingAddressSID = @PersonMailingAddressSID
                                        ,@PersonSID = @PersonSID
                                        ,@StreetAddress1 = @StreetAddress1
                                        ,@StreetAddress2 = @StreetAddress2
                                        ,@StreetAddress3 = @StreetAddress3
                                        ,@CitySID = @CitySID
                                        ,@PostalCode = @PostalCode
                                        ,@RegionSID = @RegionSID
                                        ,@EffectiveTime = @EffectiveTime;

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

                                          We’ll send you updates on this idea

                                          0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Remove empty lines after single line statements

                                          We really like the ability to collapse if statements to a single line when short but we'd prefer the addition of a general option to suppress empty lines between one line statements. For example today we get:

                                          -- check parameters
                                          if @FormRecordSID is null set @blankParm = '@FormRecordSID';

                                          if @FormSchemaName is null set @blankParm = '@FormSchemaName';

                                          if @FormTableName is null set @blankParm = '@FormTableName';

                                          if @FormDefinition is null set @blankParm = '@FormDefinition';

                                          if @Response is null set @blankParm = '@Response';

                                          and we would prefer:

                                          -- check parameters
                                          if @FormRecordSID is null set @blankParm = '@FormRecordSID';
                                          if @FormSchemaName is null set…

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

                                            We’ll send you updates on this idea

                                            0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1 3 4 5 35 36
                                          • Don't see your idea?

                                          Feedback and Knowledge Base