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

276 results found

  1. Instead of

    IF xxx
    BEGIN
    sss
    sss
    END

    It should format as

    IF xxxx
    BEGIN
    ssss
    ssss
    END

    for all cases where begin and end are used.

    18 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

    3 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)
  2. There is currently no support for the 'inserted' and 'deleted' tables within triggers. They should be treated as equivalent to the original table that the trigger is attached to.

    37 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. I just needed to re attach a database from a single mdf file. Something I do every 6 months or so and every time I have to google the command and its syntax. Would be helpful so SQL Prompt recognised and helped with these and other inbuilt procedures and their parameters, for example:

    spattachsinglefiledb

    sp_helptext

    spattachdb

    23 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)
    completed  ·  Aaron Law responded

    In 6.4 we always provide intellisense for system stored procedures if the query is being run against master.

    If you’re running against a normal db then we hide the system stored procedures by default as they clutter the suggestions list. There’s a couple ways to get around this, either by qualifying with “sys.” or using the “List system objects” option. A video on this can be found here https://www.youtube.com/watch?v=i8DOTmHkKo8

  4. Have an option to sort the column list as it appears in the table rather than alphabetically. I have a good memory for where the functionality sits in the table, but I don't always remember the name. Columns are often logically placed in the table.

    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)
    completed  ·  Aaron Law responded

    SQL Prompt 6.3 will display the columns in their table order rather than alphabetically

  5. Extend the column toolstips with the nullable attribute, like this "ic.Attachment varchar(max) not null (Column)"

    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  ·  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)
  6. I recommend splitting the two as distinct user settings. Qualify objects should have two options: Always and Only When Necessary. The reason is that in many cases, such as a simple select from one tabe, table name in front of each field is simply clutter, adding no value. I fact, I remove them manually, as I am more interested in brackets than qualifying object names.

    Brackets setting (new seeting) should have a simple Yes/No option - When set to Yes, for consistency, I recommend using brackets even in aliases (another user requested this already).

    Other thant the above, SQL Prompt…

    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

    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)
  7. As you select a Table say LotBaseLog , we get auto aliasing to give

    Select * from LotBaseLog as lbl

    What about using the alis in reverse

    Select * from lbl

    Gives

    Select * from LotBaseLog

    Have a look at Resharper Camel Hump principal

    Maybe an even better shorthand

    Mike

    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

    completed  ·  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)
  8. Support lower-casing keywords instead of upper-casing them; this makes reading the query far easier as the app-specific bits are more visible

    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

    2 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)
  9. It would be nice if SQL Prompt could parse CTE expressions and provide prompts just like for regular tables

    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)
  10. When writing a query that joins to several tables, the Join Clause only seems to look at the previos table to determine what columns can be used to join on. For example, when typing out the following query:
    SELECT * FROM [dbo].[employee] AS E
    INNER JOIN [dbo].[Department] AS D
    ON [E].[DepartmentID] = [D].[DepartmentID]
    INNER JOIN [dbo].[Position] AS P
    ON ...

    When I look at the options for the ON clause for the join to Position, it doesn't include any columns being joined back to the Employee table. It would be nice if the suggestions would include at least any foreign…

    41 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)
    completed  ·  Aaron Law responded

    We’ve released SQL Prompt 6 which includes all tables in a join clause.

  11. When I write a join statement I put the last table that I am joining to the other tables on the left side of a join clause. For example:
    SELECT *
    FROM tblOrder o
    INNER JOIN tblIOrder_Detail d
    ON d.OrderID = o.OrderID
    The auto-generated join clause would be "ON o.OrderID = d.OrderID". It would be nice if it was possible to customize this behaviour to choose which side there will be each table/alias on.

    Thanks

    27 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)
    completed  ·  Aaron Law responded

    We’ve released SQL Prompt 6 which includes an option to swap the order of columns in join clauses.

  12. Could we have a check box to allow us to have the semi colon as one of the insertion keys (Main->Behaviour)?

    It's not as common as the other keys there but when I'm about to finish a script I can't just hit the semi colon key.

    12 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 would like an additional option for the Inserted code > Qualification tab:

    Qualify column names with table aliases only.

    Most times I want to assign a table alias and use it when adding columns, however if I forget to assign a table alias or remove it, I don't want a fully qualified table name when using the Qualify column names with table name option.

    I would like the option to qualify with both table names and table aliases or just table aliases and NOT table names.

    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)
  14. I wish there where a shortcut/command to change a statement like

    INSERT INTO Mytable(Id,Code,Label) VALUES (@Id,@Code,@Label)

    in

    UPDATE MyTable
    SET Id=@Id, Code=@Code, Label =@Label

    Even if it looks trivial on this statement, doing it with a table with 10+ Columns might be cumbersome.

    79 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

    14 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)
  15. The object text exists as normal for CLR functions (or at least enough for provide auto suggest on object name and number of params and types), therefore please can function which are backed by CLR be available in the suggestion list

    47 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. If I had the table [Address] that had the columns StreetAddress1, StreetAddress2, City, State and ZipCode defined and the following existing code was formatted:

    SELECT streetaddress1,
    streetaddress2,
    CITY,
    zipcode
    FROM [address]

    I would like to see SQL Prompt match the case of the underlying object such that the results after formatting would be:

    SELECT StreetAddress1,
    StreetAddress2,
    City,
    ZipCode
    FROM [Address]

    This should apply to all underlying objects (procedures [name and parameters], tables [columns, index names (used in hints), etc., functions and views; and anything else I forgot). It should also apply to variables defined within a procedure (e.g. DECLARE @MyValue…

    63 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

    2 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)
  17. I would like to see additional placeholders for the snippet manager. For example $DBNAME$, $SERVER$, $PASTE$ (already suggested). A format option for $DATE$ and $TIME$ would also be nice (e.g. $DATE(mm/dd/yyyy)$ $TIME(hh:mm:ss24/hh:mm:ssA/hh:mm)$, etc.).

    39 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)
    completed  ·  Aaron Law responded

    We’ve released SQL Prompt 6 which includes several new placeholders.

  18. Allow alignment of column aliases in a Select statement.

    22 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

    4 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)
  19. Can not use SQL prompt to layout XML data type functions, for example this statement:

    SELECT(SELECT 1 Col
    FOR XML PATH(''), TYPE).value('.', 'VARCHAR(MAX)')

    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

    completed  ·  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)
  20. Moving commas from "end" to "start" or vice-versa is buggy when comments exist after each column or parameter. This is an issue regardless of the type of statement (SELECT, INSERT, UPDATE, CREATE TABLE/VIEW/FUNCTION/STORED PROCEDURE, etc).

    Here is my original SP with commas at "end" followed by comments (hyphens are used for indentation due to HTML formating issues):
    CREATE PROCEDURE dbo.MyProcedure
    ---- @Param1 int, --Param1 comments
    ---- @Param2 int, --Param2 comments
    ---- @Param3 int --Param3 comments
    AS
    BEGIN
    ---- SELECT Col1 , --Col1 comments
    ---- ---- Col2 , --Col2 comments
    ---- ---- Col3 --Col3 comments
    ---- FROM MyTable
    ---- RETURN
    END…

    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

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