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 or our support portal.

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. Implement all of the Find Unused Variables and Parameters functionality in Code Analysis

    Currently Code Analysis does not implement all of the items that Find Unused Variables and Parameters does.

    Specifically I know it's missing:
    - Declared variables that are used before a value is assigned
    - Assigned values that are never used

    Ex.
    With this code:

    DECLARE @Test NVARCHAR(1)
    DECLARE @Test2 INT
    DECLARE @Test3 DATE

    SET @Test = 1

    SET @Test = N'Test' + @Test2

    Code Analysis will flag the DECLARE for @Test for having a NVARCHAR of size 1 and @Test3 for not being used, but it will not flag @Test2 for being used before a value is assigned to it…

    3 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  2. 1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  3. Menu option: 'Normalize Line Endings'

    Sometimes line-endings get messed up by source-control (looking at you Git) and "intellisense" will give you lots of green squigglies that you'd rather not commit to the branch.

    A good menu option for SQL Prompt would be 'Normalize Line Endings' with a sub-menu selection of 'Windows' or 'Unix'. Then fire off a regex expression powered search and replace on the file. It's fairly easy to do manually with a Ctrl+Shift+F in Visual Studio, but in SSMS, it's more complicated to do so manually, I think.

    Git does this to me once in a while, and I have to open the…

    3 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  4. "drop user"

    Highlight of today was when I ran

    DROP USER MyUser

    In the wrong (production) database.

    Please add a warning to SQL Prompt, like your
    "You're about to execute a DELETE statement without a WHERE clause"

    When you run a DROP USER or a DROP LOGIN statement on a production server. Not only does the user or login disappear, but also all rights granted to the user.

    Maybe add the question “are you in the correct database?”

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  5. Autofix for existing functionality

    There are cases where the code analysis detects errors and where the tool already have functionality to correct the issue. For instance with unqualified column names

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  6. Autofix with shortcut

    A shortcut to implement the autofix changes.
    Would be nice if it wasn't necessary to use the mouse when applying autofixes.

    It is almost there; you can press ctrl and get the error window and even just press enter then, to apply the fix. But the window stays and there is no reason to actually open the window, the fix could/should just be applied

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  7. Mark same columns in JOIN conditions

    It helps avoiding join on the same column (especially at inner join).
    Example:
    UPDATE A SET Column1 = B.Column2 FROM TableA AS A INNER JOIN Table B ON A.Column3 = A.Column3.
    It happens usually by accident. The statement should be:
    UPDATE A SET Column1 = B.Column2 FROM TableA AS A INNER JOIN Table B ON A.Column3 = B.Column3.

    5 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  8. DEP026, updated to work with spatial code

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

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  9. 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…

    4 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  10. 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…

    14 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  11. 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.

    5 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  12. 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
    --

    17 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  13. 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.

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  14. 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.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

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

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

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  16. 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
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  17. 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
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  18. 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
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

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

    Add rule for deprecated DATABASEPROPERTY

    3 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
  20. 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
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →
← Previous 1
  • Don't see your idea?

Feedback and Knowledge Base