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. Add option to not qualify fields in the SET clause of an UPDATE statement

    PRE-REQUISITE: Under "Options > Inserted Code > Qualification", enable both "Qualify column names with..." options.

    When specifying the columns in the SET clause of an UPDATE statment, auto-complete qualifies each column with alias/name of the table that is to be updated. Please include an option to not qualify the column names being SET an UPDATE. Columns used in expressions should still be qualified.

    =================================================
    Example 1: simple update
    -------------------------------------------------
    -- instead of this:
    -------------------------------------------------
    update ExampleTableA
    set ExampleTableA.Field1 = 'a value',
    ExampleTableA.Field2 = 'another value';

    -------------------------------------------------
    -- do this
    -------------------------------------------------
    update ExampleTableA
    set Field1 = 'a value',
    Field2 = 'another…

    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  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →
    • Variable Management

      This might be similar to a couple others, but I can't find the exact thing so I'm creating my own.

      When you type a variable stmt, it would be nice to have the declaration made for you. But that's not all... you should be able to decide whether the var gets created right above the stmt, or it gets created in the main list of vars at the top of the script.

      And that's not all. It would be nice if we also had the choice to have that main list of vars keeps in alphabetical order. I write some…

      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 →
      • EI003 incorrectly fires for ANY or AND

        EI003 incorrectly identifies the ANY and ALL clauses

        Select test
        from table1 where id = ANY(select linkedId from table2)

        have squiggle under the (select linkedid from table2)

        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 →
        • Where clause from data

          When looking at the data returned by a SELECT, it would be great to select a few rows and have SQL Prompt generate a WHERE clause to get just those rows

          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  ·  Split table  ·  Flag idea as inappropriate…  ·  Admin →
          • Suggest Primary Keys first for join option

            When joining two tables that don't have a foreign key relation, SQL Prompt suggests all columns that exist in both tables (e.g. table1.col = table2.col). If one of those fields name is a primary key (e.g. if table1.col and/or table2.col are primary keys on their respective tables) then list that as the first suggestion.

            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 →
            • Rename variables on the line only

              It would be great if I could rename variables/column names on just a single line of code. For example, I might have an update statement that is going to divide itself against some other column. COL123 = COL123 / COLABC. If I have several columns where I need to do this too I duplicate the line many times. It would be great if I could use Shift-F2 or something to rename just the line I'm on so when I apply that to COL123 and change it to COL456 it would automatically do the 2nd part after "COL456 = COL456 /…

              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 →
              • Remove unnecessary BEGIN / END statements

                Please add the option to remove unnecessary BEGIN / END statements when only a single statement is being executed.

                So instead of:

                IF @A = 1
                BEGIN
                exec dbo.SomeProc
                END

                It becomes:

                IF @A = 1
                EXEC dbo.SomeProc

                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 BEGIN and END statement around stored procedure

                  Since wrapping the content of stored procedures in a BEGIN / END block is already a suggestion is RedGate SQL Prompt, I think that the formatter should do this for you when you run the format.

                  Also, I feel it should standardize the stored procedure CREATE statement to CREATE PROCEDURE schemaname.storedprocedurename

                  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 new lines but do not add them

                    This is fairly easy to implement. I would like SQL Prompt to remove empty lines but not add them. This would be implemented as another checkbox in the whitespace/new lines style settings. So for example, I'd like SQL Prompt to collapse empty lines between statements down to 1, but not add new lines if there are no empty lines to begin with.

                    Another way to look at it is that I'd like to set the maximum number of empty lines between statements to 1.

                    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 →
                    • Code Analysis: Warn if OR operator is not wrapped with parentheses

                      Over the years I have lost many hours by code that had multiple AND and OR operators. It's easy to misinterpret the order of precedence. I now believe that every OR statement should have a parentheses between the OR and it's parent (WHERE or AND) and any child (AND) operator. This will help ensure the true intention of the programmer. The below code is an example of what I'm referring to.

                      /*
                      This type of code concerns me because I'm not clear on what the author wanted.
                      The SQL Prompt default format style helps, but not everyone formats things
                      the…

                      4 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  ·  Flag idea as inappropriate…  ·  Admin →
                      • "Copy as IN clause"

                        I miss the ability to enable/disable ISO 8601 formatting for “Copy as IN clause”:

                        I have a table with a datetime2 field.
                        When I highlight a cell and choose “copy with headers” from the context menu, I get this:
                        Depotid
                        2010-03-11 15:15:23.9841399

                        When I use “Copy as IN clause”, I get this:
                        IN
                        (
                        N'2010-03-11T15:15:23.9841399'
                        )

                        I would prefer if “Copy as IN clause” doesn’t convert the field content to ISO 8601 standard.
                        Yes, it is good to standardize, but it is even better to have a copy function which do not alter the copied string.
                        It does not matter…

                        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 →
                        • can more scripting configuration options be added?

                          This is similar to other ideas, but we'd like to be able to optionally configure the various scripting functionalities in a manner similar to what's implemented in SSMS.

                          For example, remove

                          `COLLATE SQL_Latin1_general_CP1_CI_AS`

                          from the create statement generated by the popup when you hover over a table name. (We really like that feature, btw.)

                          Is that a difficult thing to add? It would be very useful for our team.

                          Thanks!

                          More detail here:

                          https://forum.red-gate.com/discussion/82230/can-the-create-table-script-in-sql-prompts-popup-be-configured-to-omit-the-collate-clauses#latest

                          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 →
                          • 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 →
                            • exec

                              In the Options "Objects & Statements > EXEC statements > Insert parameters for functions and stored procedures" the "Insert default value for each parameter" option if unchecked, instead of using `?` should use `DEFAULT` keyword, as if the parameter was not passed at all.

                              If this checkbox is on, default values for each datatype are used which most the time are incorrect anyway. Other people have requested there be parsing of the default values defined within the procedure/function itself, but I realize this could be problematic for performance.

                              Instead, just using DEFAULT keyword allows for quicker usage and not having…

                              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 →
                              • New SCA Rule: Column joins to itself

                                A rule that would catch the scenario where a column is accidentally joined to itself, instead of to a column in a different table:
                                SELECT *
                                FROM a
                                INNER JOIN b
                                ON a.id = a.id

                                Or in general, anything that ends up with a "No Join Predicate" warning in the query plan without having an explicit CROSS JOIN.

                                4 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  ·  Flag idea as inappropriate…  ·  Admin →
                                • LOGINPROPERTY

                                  The LOGINPROPERTY function is not listed in Intellisense like DATABASEPROPERTYEX and SERVERPROPERTY. And since it is not listed, the applicable properties are not provided either.

                                  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 →
                                  • New SCA rule: Named constraints on temporary tables

                                    Can we get a rule that raises a warning when a named constraint is created on a temporary table?

                                    It is possible (which means one of my developers did it) and of course, as a constraint is an object independent of a table, that means that if you try to create a second instance of that temporary table on a different connection, that creation fails with the error "There is already an object named 'pk' in the database." Run the code below in two separate query windows as a repro:

                                    CREATE TABLE #t (i INT NOT NULL
                                    ,CONSTRAINT pk PRIMARY…

                                    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  ·  Flag idea as inappropriate…  ·  Admin →
                                    • EI003 to allow variable assignment of MIN and MAX and Scalar-valued function results

                                      At the moment a warning is given "Non-scalar subquery in place of a scalar" when trying to assign a variable to the result of a MIN or MAX query which would only result in a single value. Also get the warning when i create a Scalar valued function and assign variable to result of a call to that. In each of these case only one result can be returned so the warning appears inaccurate and wrapping the result in a TOP 1 { } ORDER BY statement seems an overkill just to remove the warning

                                      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

                                        3 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                      • display binary field as

                                        One the features that I liked more from SSMSBoost is the option to visualize the Binary data opening as specific format, is that something possible to have in SQL Prompt?

                                        On the result Grid you can right click the binary field and open it as PDF or JPG, etc.

                                        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 →
                                        • Trimming trailing spaces in comments

                                          It would be cool if SQL Prompt was able to remove trailing whitespaces/tabs not only for T-SQL, but also for comments.

                                          It's not something crucial, but rather nice-to-have

                                          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 →
                                          ← Previous 1 3 4 5 38 39
                                          • Don't see your idea?

                                          Feedback and Knowledge Base