Skip to content

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.

SQL Prompt

Categories

JUMP TO ANOTHER FORUM

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback

48 results found

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

    67 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  2. 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

    21 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  3. 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…

    16 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  4. 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.

    14 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  5. 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.

    13 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  6. After removing of SQL Code debugging features beginning with Management Studio 18, it would be quite welcome to have this feature in SQLPrompt.
    Other competitors are already providing debugging.

    9 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  7. Open the Rules Engine API so that we can create our own organizational specific rules.

    For example, I would like to be able to flag datetime, getdate(), getutcdate().

    9 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  8. 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…

    9 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  9. 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.

    8 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  10. 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

    8 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  11. 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 query filtered by the primary key column. In this 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. This is kind of a special case however where the subquery contains only one table filtered with "=" on the primary key column, but it is a very common one.

    Example:
    DECLARE @X…

    6 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  12. 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…

    6 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  13. 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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  14. Check if left and right are the same, and so always true:

    like Where [Column]=[Column]

    or Where @var1 = @var 1 ..

    this is a big mistake .. just happened to me ..

    4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  15. Consider a table
    CREATE TABLE [dbo].[ItemGroups](
    [Group] [VARCHAR](25) NOT NULL,
    [Description] [VARCHAR](25) NOT NULL)

    SELECT Group from dbo.ItemGroups ->

    Incorrect syntax near the keyword 'Group'.

    Would be nice to get a warning when a column name is a reserved word. Square brackets make the syntax valid but unnecessary if a column is named more accurately, e.g. ItemGroupCode

    4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  16. Currently there is no way to tell Code Analysis to ignore this specific object for a specific rule which has led to several false positives and wasted time re-investigating how to address the issue in the object only to come to the same conclusion as before that this is one of the rare cases where breaking that rule is ok.

    My example is we have one stored procedure out of a thousand where the use of a NVARCHAR(2) makes sense and is actually more efficient then switching to a NCHAR(2) for what the code needs to do. Unfortunately the procedure…

    4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  17. The list is useful to drive code positioning, but that's all it does. Rules like ST011 that go against authoritative SQLPass presentations are noise. Yes, we can click the SQP Menu, nav to manage, scroll down, and finally disable, save, then refresh... (out of breath!). Just right-click and Disable rule, which also refreshes the list. That kind of useful RC-Menu. And instead of having to go to the Rule Maint to see exactly what the rule is enforcing, RC-menu has "Show Issue Help" in a bubble, built in. And for those cases where a rule isn't to be shut down,…

    4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  18. 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…

    4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  19. Have SonarQube plugin that will do code analysis using your rules rather than TSQL or PLSQL plugins

    4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  20. 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

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
← Previous 1 3
  • Don't see your idea?