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. Align "then"

    Please add an option to align "then" keyword and the expressions.

    Current format:
    declare_@fooid_int_=_(case
    __________________________when_@barId_=_7_then_2
    __________________________when_@barId_=_800_then_1
    __________________________else_5
    ______________________end
    _____________________);

    Suggested format:
    declare_@fooid_int_=_(case
    __________________________when_@barId_=_7___then____2
    __________________________when_@barId_=_800_then____1
    __________________________else______________________5
    ______________________end
    _____________________);

    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 →
    • New line after opening bracket

      Please add an option to insert a line break after opening bracket if brackets contain multiple lines.

      Current format:
      declare_@fooid_int_=_(case
      __________________________when_@barId_=_7_then_2
      __________________________when_@barId_=_8_then_1
      __________________________when_@barId_=_9_then_4
      __________________________when_@barId_=_10_then_3
      __________________________else_1
      ______________________end
      _____________________);

      Suggested format:
      declare_@fooid_int_=_(
      ____case
      ________when_@barId_=_7_then_2
      ________when_@barId_=_8_then_1
      ________when_@barId_=_9_then_4
      ________when_@barId_=_10_then_3
      ________else_1
      ____end
      );

      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 →
      • Align ON in JOIN Statements

        I really like the latest formatting flavours. Aligning the equivalency symbols in joins is nice, but could I also align the ON keyword? Or pick which one I want to align on.

        SELECT *
        FROM table1 a
        JOIN Table2 b_____ON a.foo = b.foo
        JOIN Tab3 c______ ON b.fa__= c.fa

        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 →
        • Format dynamic SQL

          We use a lot of dynamic SQL. I'd like to be able to format dynamic SQL that is in a string, eg. and NVARCHAR. e.g.

          Input: DECLARE @sql NVARCHAR = '

          SELECT foo from bar where foobar = ''foobarred''
          '

          I'd like to be able to highlight the text inside the NVARCHAR for formatting. SQL Prompt would need to handle doubled quotation marks as in my example above.

          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 →
          • Do not rename the inserted table.

            We are case sensitive so when you format inserted to Inserted the columns should be something like WHERE inserted.Name = 'bob' but instead the formatter makes it like this....

            SELECT *
            FROM Inserted
            WHERE inserted.Name = 'bob'

            Which fails on compile because of case sensitivity.

            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 →
            • SQL Object quick navigation via keyboard shortcut & context menu

              So a product called SqlSmash has this feature. It is a concept that exists in Visual Studio (or ReSharper) as well, which is the ability to quickly navigate via keyboard shortcuts to SQL objects (either by selecting them in object explorer or giving you the option to open them).

              For instance, I could hit CTRL+. (or some other combination) which would bring up a context menu listing either the SQL objects for the current database/server, OR give me the option to switch server contexts. From the context menu I could filter the objects by typing, using the arrow keys to…

              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  ·  User interface  ·  Flag idea as inappropriate…  ·  Admin →
              • Automate Find Invalid Objects through Script or API

                Enable/create a way to write a script or automate this feature so it can be run frequently (i.e. weekly basis) getting the list of invalid objects as the output instead of manually going to SSMS and right-clicking each and every single database.

                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  ·  Find invalid objects  ·  Flag idea as inappropriate…  ·  Admin →
                • New Snippet HAVING COUNT(*) > 1

                  Maybe there is a section of the site just for snippet suggestions, but here is one I use all the time:
                  hav = HAVING COUNT(*) > 1

                  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 →
                  • Enhancement to Unfiltered Update warning

                    Warning on Update without a Where clause triggers for Update statements inside Merge statements, which makes the warning completely useless if you work with mostly scripts containing Merges like me.

                    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 →
                    • Allow user to define order that schema appears in suggestions

                      I would like to be able to define the order that a table appears with schema suggestions in the Suggestions menu for auto complete.

                      Example: I have TableX in both dbo and archive schemas when I type
                      select * from Table; I want the suggestions to show TableX for dbo and then TableX for archive.

                      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 →
                      • More control over "place first item on new line" in SQL Prompt 8

                        I would like to be able to have more control over when the first item of a list is on a new line. Prior to version 8 I was able to have the first column in a SELECT statement on the same line as the word "SELECT", but the first parameter on a procedure call on a new line.

                        In SQL Prompt 8 every type of list is controlled by the one setting in: GLOBAL --> Lists.

                        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

                          0 comments  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                        • right click object >> transfer schema

                          as I develop new databases, i always find myself fine tuning my naming conventions and re-organising my objects based on schemas. it would be nice to have a right click option to change the schema much more quickly.

                          For example, instead of writing the following statement

                          ALTER SCHEMA HumanResources TRANSFER Person.Address;

                          i would just right click Person.Address >> Change Schema >> (and then pick HumanResources from a list)

                          being able to select multiple objects and do this would be a bonus

                          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  ·  Smart rename  ·  Flag idea as inappropriate…  ·  Admin →
                          • Tab-colouring, Product Groups and Tab-templates

                            Having to assign a colour per DB per server is tedious for those of us who manage many DBs across many servers.

                            I would like to be able to assign a product group a specific colour. Within this product group, I would further define which servers are development, which are integration, which are production and so on. Each of the servers within the product group would have a progressively lighter shade of the initially chosen colour.

                            Added to this, the system DBs (and especially MASTER) would have a shading (cross-hash maybe?) to indicate that the user is not on a…

                            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  ·  Tab coloring  ·  Flag idea as inappropriate…  ·  Admin →
                            • Snippets: Database-specific Snippets

                              I would like database-specific snippets. Many table-names occur across databases but have different schemata.

                              Rather than the snippet manager loading all snippets for each DB, it would make more sense to bind a snippet to specific databases.

                              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 →
                              • Snippets: All snippets in one CSV file (or in one table on a specified DB)

                                Having all of the snippets as individual files is annoying. When I take charge of a new database, I have to spend an hour or two entering all of the various table and other object names manually.

                                Ideally, I would like to be able to run an SQL script and save the lot in one CSV file. It would be easy then to edit in Excel. An alternative would be to store the details in a database table of my choosing.

                                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 →
                                • Create package for Visual Studio Code

                                  Visual Studio Code has the ability to connect to SQL servers and execute scripts. It would be nice if SQL Prompt was available for Code as well.

                                  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

                                    0 comments  ·  Intellisense  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Indent first line of where clause

                                    Option to allow Indent first line of where clause. This is especially useful when comparing the same column multiple times as they're all then aligned.

                                    WHERE
                                    A.col1 = x
                                    OR A.col1 = y
                                    OR A.col1 = z

                                    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

                                      1 comment  ·  Format SQL  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Don't suggest join keys I've already used

                                      After I type
                                      SELECT * FROM sys.indexes i
                                      INNER JOIN sys.partitions p
                                      ON i.index_id = p.index_id
                                      AND

                                      the IntelliSense still suggests me i.index_id = p.index_id which I've already used. These duplicates can become pretty annoying when multiple columns are used for joining

                                      8 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  ·  Intellisense  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Include any referenced object in Summarize Script

                                        At the moment we have basic SELECT statement handling in Summarize Script, only showing whether it is a SELECT FROM <table> or SELECT <expression>.

                                        So a query such as

                                        USE [AdventureWorks2014]
                                        GO
                                        select
                                        (select top 1 emailaddress from Person.EmailAddress),
                                        dbo.ufnGetPurchaseOrderStatusText(1)
                                        from Person.Person

                                        Would only show

                                        SELECT from Person.Person

                                        Would be useful to also show any tables referenced in a subquery, and also UDFs.

                                        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  ·  Summarize script  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Generate SET [OPTION] for when altering procedures

                                          When auto-generating source for ALTER PROCEDURE, make sure to replicate the original options settings. For example, generate a "SET QUOTED_IDENTIFIER OFF" if the procedure originally had this setting.

                                          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  ·  Script object as alter  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1 3 4 5 31 32
                                          • Don't see your idea?

                                          Feedback and Knowledge Base