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 https://forum.red-gate.com/categories/sql-prompt

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. DEP026, updated to work with spatial code

    w.sysLocationXY.STX, should not generate an code analysis error.

    1 vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)

      We’ll send you updates on this idea

      0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
    • Implement all SQL Code Guard Rules in SQL Prompt Code Analysis

      There are several rules that are only available in SQL Code Guard. And with SQL Code Guard no longer being maintained they should be implemented in SQL Prompt Code Analysis so that we can avoid having to use two products.

      By our count here are the rules currently not implemented in Code Analysis:

      DEP004 COMPUTE and COMPUTE BY clauses are deprecated
      DEP005 FASTFIRSTROW table hint is deprecated
      DEP008 PASSWORD/MEDIAPASSWORD options in BACKUP/RESTORE statement are deprecated
      DEP010 DBCC CONCURRENCYVIOLATION is deprecated
      DEP017 NON-ANSI join (*= or =*) is used
      EI001 Incompatible variable type for procedure call
      EI002 Incompatible literal type for…

      3 votes
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)

        We’ll send you updates on this idea

        0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
      • Ability to run Code Analysis against whole DB

        With the deprecation of SQL Code Guard and it's replacement by Code Analysis there is one feature that we heavily used that is now no longer there, and that is the ability to run SQL Code Guard against the whole DB not just the query on the screen.

        This allowed us to investigate new DBs that we'd inherited to see what sort of cleanup we might be looking at as well as giving us the ability to see if anything had snuck in to our existing DBs without going file by file.

        I know there are other tools (like SQL…

        10 votes
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          Signed in as (Sign out)

          We’ll send you updates on this idea

          0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
        • PE019

          I'd like to vote for adding PE019 (Consider using EXISTS instead of IN) to the issues which can be auto-fixed.

          It feels like the kind of re-write that would probably be simpler for a computer to do than a person.

          3 votes
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            Signed in as (Sign out)

            We’ll send you updates on this idea

            0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
          • SQL Prompt Code Visualization (Like Flow Chart)

            SQL Prompt should be able to Visualize the Code and represent the code like Flow Chart.
            This Feature will be very useful while working with heavy Stored Procedures.
            The Sample Code Visualization image is shared below:
            --
            https://drive.google.com/file/d/1dE0H7UP1MOuOZ4A3e4urUkDlR0FD4474/view?usp=sharing
            --

            11 votes
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              Signed in as (Sign out)

              We’ll send you updates on this idea

              2 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
            • Issue code SC003 when USE is first line

              Issue code SC003 shouldn't happen if the USE statement is at the top of a SQL script.

              1 vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                Signed in as (Sign out)

                We’ll send you updates on this idea

                0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
              • A Create/Declare Table statement with a Primary Key gives a false positive BP014 in Code Analysis

                If you have a table declared like this:
                Declare @Test table
                (TheKey int Primary Key,
                SomeData varchar(10) Not Null)

                I am told that for "TheKey" "[NOT] NULL option is not specified in CREATE/DECLARE TABLE statement" defined. But, a Primary Key can never be null, so it is NOT NULL by nature.

                So, when performing Code Analysis and the parser sees "Primary Key", "Not Null" should be inferred also.

                2 votes
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  Signed in as (Sign out)

                  We’ll send you updates on this idea

                  0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                • Make SQL Prompt & SCG Command line ignore code where scgignore is set

                  We have adopted SCG and have commented out areas of code we do not want checking with scgignore. The new version of SCG command prompt and SQL Prompt do not recognise these comments, and report the area of code with warnings.
                  Please amend so they are not reported, or at least reported differently so we can ignore.

                  0 votes
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    Signed in as (Sign out)

                    We’ll send you updates on this idea

                    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                  • sonarqube

                    Have SonarQube plugin that will do code analysis using your rules rather than TSQL or PLSQL plugins

                    2 votes
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      Signed in as (Sign out)

                      We’ll send you updates on this idea

                      0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                    • Allow custom rules for code analysis

                      SQL Prompt has the ability to catch and warn about Update statements without Where clauses.

                      How about something similar that catches and warns about security commands like Grant or Deny.

                      2 votes
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        Signed in as (Sign out)

                        We’ll send you updates on this idea

                        0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                      • DECIMAL default scale warning in Code Analysis

                        Would be great if SQL Prompt Code Analysis would give a warning on SQL Below:

                        SELECT CAST( 1.453 AS DECIMAL)
                        SELECT CONVERT(DECIMAL, 1.453 )

                        2 votes
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          Signed in as (Sign out)

                          We’ll send you updates on this idea

                          0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                        • EXEC sp without return (EXEC @Results = sp)

                          EXEC sp_who2 without return (EXEC @Results = sp_who2)
                          Give a warning when tsql or stored procedure has execute a stored procedure without a variable for an error to bubble up to.

                          This is the proper way because ieven in a try catch the Exec sp_who2 won't give and error to stop the tsql from going on

                          3 votes
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            Signed in as (Sign out)

                            We’ll send you updates on this idea

                            0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                          • Add rule for deprecated DATABASEPROPERTY

                            Add rule for deprecated DATABASEPROPERTY

                            3 votes
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              Signed in as (Sign out)

                              We’ll send you updates on this idea

                              0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                            • Offline TSQL code analysis and Standardization report..Where we can add custom rules regarding to company naming procedure

                              My Name is Waleed Abrar and my license number is. I am actively looking of Static TSQL Analysis and I was really happy with the SQL Prompt. I have done some analysis and implemented some test cases. It works really good working live and parallel to development . I want to ask if it’s possible to do an offline analysis and get a HTML or Excel report for a particular database about the TSQL code Quality inside the DB. For Example I can select the Database ‘XYZ’ and then click Analyze static code. It will give me a report back…

                              2 votes
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                Signed in as (Sign out)

                                We’ll send you updates on this idea

                                0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                              • Inconsistently Advised to Use Alias For CTE (ST010)

                                Simple statements do not flag this:

                                WITH CTE1 AS (SELECT TestColumn FROM dbo.TestTable)
                                SELECT a.TestColumn FROM CTE1 a
                                INNER JOIN CTE1 b ON a.TestColumn = b.TestColumn;

                                However, more complex statements do:

                                WITH CTE1 AS (SELECT TestColumn FROM dbo.TestTable),
                                CTE2 AS (SELECT TestColumn FROM CTE1),
                                CTE3 AS (SELECT TestColumn FROM CTE2)
                                SELECT CTE3.TestColumn FROM CTE3
                                INNER JOIN CTE2 ON CTE3.TestColumn = CTE2.TestColumn;

                                In the final select clause, both CTE2 and CTE3 are flagged with 'Use alias for all table sources' (ST010).

                                Seems a bit OTT to suggest references to CTEs are aliased? I accept that a CTE defines, in relational terms,…

                                4 votes
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  Signed in as (Sign out)

                                  We’ll send you updates on this idea

                                  0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                                • Code Analysis EI028 Incorrectly Identified When Adding Not Null Column With Explicitly Defined Default Value

                                  Stop raising EI028 when adding columns using style:

                                  ALTER TABLE dbo.MyTable
                                  ADD TestColumnB CHAR(1) NOT NULL,
                                  CONSTRAINT DF_MyTable_TestColumnB DEFAULT ('B')
                                  FOR TestColumnB;

                                  2 votes
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    Signed in as (Sign out)

                                    We’ll send you updates on this idea

                                    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Ability to code analyse existing database (SPs, triggers, etc.)

                                    SQL Prompt provides the ability to improve your on-the-fly coding according to standards and best practices defined locally or within the organisation.

                                    How about the ability to analyse an existing database and isolate problematic areas, code smells and provide not only recommendations but also the ability to refactor the database code based on rule-sets?

                                    This would be really great and a time-saver to improve the code quality in the whole database.

                                    Thanks, Jochen Kirstätter, MVP

                                    6 votes
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      Signed in as (Sign out)

                                      We’ll send you updates on this idea

                                      0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Highlight Implicit Conversions due to Data Type mismatch

                                      After spending some time refreshing my memory on implicit conversions, and the potentially disasterous affects on performance, the thought hit me...

                                      Wouldn't it be great if SQL Prompt could hightlight potential implicit conversions when I write JOINS or WHERE statements?

                                      I'm not sure how easy this would be to implement but I know everyone at Red Gate is very intelligent and highly creative so you'll find a way. :-)

                                      40 votes
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        Signed in as (Sign out)

                                        We’ll send you updates on this idea

                                        3 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Don't see your idea?

                                      Feedback and Knowledge Base