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

636 results found

  1. Allows you to define (on a per tab/session basis) a list of variables you would like to be declared before running the highlighted piece of SQL.

    Reason: I like to put all of my "magic numbers" in variables at the top of the proc. This works great for code readability, but it's a pain to troubleshoot because now everywhere the variable is used, you need to copy that variable declaration above whatever code you are testing in order for it to work.

    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

    1 comment  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    Thanks for the suggestion Chad. We think this is a nice idea, we’ll wait to see how others in the community comment and vote before taking it forward.

    Tim

  2. Do you think it's possible to only have the refresh of suggestions the first time a database is loaded (so skip refresh if the cache already exists, but let the possibility to manually refresh cache for this db with the contextual menu of course)

    We have hundred of databases (with thousands of view and sp) and sql prompt try to refresh all the time the same databases (for example when we restart Management Studio) and nothing never change in these databases ...

    So we would like to load schema automatically only the very first time and then on demand.

    Thanks

    1 vote

    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

    0 comments  ·  Intellisense  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  3. When the option to insert a values clause with default values for an INSERT statement is in force, the default values used by SQL prompt ignore nulls. e..g if your table is CREATE TABLE foo (bar int NULL) and you let SQL Prompt build an INSERT with default values, it uses 0 as the default for column bar. This is wrong. The true default is NULL. It would be better if SQL Prompt just used a value clause like :

    VALUES (DEFAULT)

    and let SQL Server figure out the default. Worse yet, check out this table and the generated code:

    3 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. I have different wants for parentheses rules: Collapse short content or not, Having Parentheses on separat lines or leading the content, etc. It all depends on the context. But currently the setting is global.

    I would like to be able to define one rule for, say, Primary Key definitions, and another rule for, say, the columns of a table.
    I would want one thing for Control Flow sections, and another thing for Variables declarations.

    Today, I need to choose which one to be dominant (or stop using FORMAT SQL on the entire script, but just highlight the block where I…

    3 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

    0 comments  ·  Format SQL  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  5. When writing SQL codes I frequently use aggregate functions such as Sum, count, avg etc.
    When writing for exapmle sum(SalesVolume) it would be nice to have an autocomplete option to Sum(SalesVolume) As SalesVolume or Sum(SalesVolume) as SumSalesVolume.

    2 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. When cursor is placed on any line simple shortcut would insert exactly same line below and move cursor to the newly inserted. No prior selection of any kind necessary.

    1 vote

    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

    0 comments  ·  User interface  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  7. I'm constantly opening new SSMS windows, closing new ones, opening new visual studio windows, etc, and every time I open a new window, I have to acknowledge the upgrade prompt because it covers important parts of the window (like the status bar). Even if I select "next month" or "skip this version" I have to do the same for every new window I open since new sessions don't check for this option on existing sessions. SQL prompt is constantly getting updates (almost weekly, it seems), so i just start a new round of "skip this version" the following week.

    Can…

    2 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. 1 vote

    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

    0 comments  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  9. When typing a snippet eg I type zcod I get 3 suggestions - but the top one is a merge replication conflict table definition for MSmergeConflictZZZFULLZZZcodt and the 2 below it are my own snippets starting with zcod
    I don't understand why this is the case, my own suggestions that START with zcod should take precedence over an is
    ms_shipped table that ends in zcod surely.
    I see you recently added (I am on 9.5.11) ordering based on frequency and I never click this table as it serves no purpose so I cannot understand the behaviour.

    2 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

    1 comment  ·  Intellisense  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  10. We use the WITH (TABLOCK) hint extensively for loading temp tables - see https://www.sqlshack.com/use-parallel-insert-sql-server-2016-improve-query-performance/

    PE006 is far too picky - it yells at every such statement in our high-volume hybrid solution. It would be good to "silence" this kind of rule-breakage so we can see any REAL violations on persisted tables.

    Please augment to utterly ignore temp tables.

    1 vote

    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

    0 comments  ·  Code Analysis  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  11. Options, Warnings & Highlighting, Highlighting. The light gray does not work well on a black background. I'd like to be able to select another color for that feature.

    2 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. I write a LOT of unit tests, usually at the rate of 15:1 to 20:1 to my executing code. I have these standardized and templated to make them easier and more consistent to build. e.g. @GUID UNIQUEIDENTIFIER = NEWID(),
    @Char CHAR(1) = 'A',
    @Int INT = 1,
    @Datetime DATETIME = CURRENTTIMESTAMP,
    @Decimal DECIMAL(18,10) = 1.0,
    @Date DATE = CURRENT
    TIMESTAMP,
    @Time TIME = CURRENT_TIMESTAMP,
    @Bit BIT = 1,
    @Money MONEY = 1.00,
    @Binary VARBINARY(18) = 0x01,

    These go into my VALUES clause for INSERT statements, but I current have to do all of this manually, which takes a LOT…

    2 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

    1 comment  ·  Format SQL  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  13. The "Remove Square Brackets" option does not work for "CREATE EXTERNAL TABLE" statement.

    Please try this option with the example below and nothing happens.

    CREATE EXTERNAL TABLE [ft].[Account]
    (
    [AccountId] [bigint] NOT NULL,
    [AccountType] [nvarchar] (50) COLLATE NOT NULL,
    [AccountCreatedDate] [datetime2] NOT NULL
    )
    WITH
    (
    DATASOURCE = FinancialDB,
    SCHEMA
    NAME = 'Account',
    OBJECT_NAME = 'Account'
    );

    2 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

    0 comments  ·  Format SQL  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  14. Very often I need to create a temp table, table variable, or UDTT that is a duplicate or subset of an existing table. I'd like the @table definition to include primary key and unique constraints and any check constraints and default constraints that are in the actual table. No foreign key constraints obviously. SSMS object scripting botches this up by creating a bunch of alter statements instead of including constraints inside the CREATE statement.

    7 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. Enabled Intellisense conflicts with SQL Prompt and needs to be disabled. This also disables Code Folding feature (Outline Statements) of SSMS, which is very useful for large coding projects.
    It would be helpful if SQL Prompt were to offer the similar feature.

    7 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. I have some snippets that I would like to be server specific. For example, we have two servers, each one has a sort of "support" database, but they do not have the same database name. But both databases have maintenance procs I like to use that do have the same name.

    I'd like to have some way of saying "If I am on Server1, then run SnippetA, if I am on Server2 then run SnippetB"

    OR

    Allow something like this as part of the snippet:

    $IF($SERVER$='Server1','String1','String2')$

    3 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. Current behaviour: let's say we're editing a multi-statement script. The cursor is in the middle of one of the statements. Some other statements in the script are broken (i.e. have invalid syntax) but the one under the cursor is perfectly valid. We hit Shift-F5, expecting the current statement to be executed. Instead, we get a syntax error on some other piece of the script half a mile down the screen.

    Expected behavior: just run whatever is under the cursor and ignore all other parts of the script.

    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)
  18. Today’s mail from https://sqlquantumleap.com/2019/05/09/maximum-number-of-rows-for-the-table-value-constructor/
    Shows as way around the 1000 rows limitation on the VALUES ()… statement.

    Please enhance SQL Prompts “Script as Insert” feature to use this method.
    Currently SQL Prompt is scripting it like this, when the results window has more than 1000 rows:
    CREATE TABLE #temptable( [id_user] int, [RowCnt] int, [mt] datetime)
    INSERT INTO #temptable
    VALUES
    ( 372, 2,N'2012-09-01T00:00:00')
    INSERT INTO #temptable
    VALUES
    ( 196, 2,N'2012-09-01T00:00:00')
    INSERT INTO #temptable
    VALUES
    ( 210, 2,N'2012-09-01T00:00:00')

    It can be done like this:
    CREATE TABLE #temptable( [iduser] int, [RowCnt] int, [mt] datetime)
    INSERT INTO #temptable
    select *
    from(
    values

    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)
  19. Love the Recently Used Suggestions feature. It's like it's reading my mind and is a definite time saver.

    1 vote

    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

    1 comment  ·  Intellisense  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  20. So i specifically excluded our "temp" schema from my suggestions and it works brilliantly, however, when specifically want that schema, after completing the schema name it should show me the suggestion within that schema? -
    Currently my options are to remove the "don't show suggestions" for the temp schema and then add it again after this session.

    2 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)
  • Don't see your idea?