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

637 results found

  1. When hovering over an object name to view its contents...the tab size used in the code is much larger than what is being used in SSMS. So the formatting of the preview is completely messed up.

    Maybe a setting to configure the tab size? Or maybe it can look up what SSMS is using?

    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)
  2. It would be nice if SQL Prompt had a way to add in the code DROP TABLE IF EXISTS #table for temp tables. Ideally it would add the statement immediately before the table is created from a CREATE TABLE or SELECT INTO statement.

    11 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)
  3. Sometimes I set a variable equal to many strings concatenated together using the "+" syntax. When I format with Regdate, there is no option to wrap lines in this case. Everything ends up on the same line as the SET, so the lines often get very wide and go off screen.
    It would be great if there was an option to wrap text if things got too wide horizontally.
    One solution would be a setting to format concatenated strings like this:
    SET @Variable = N'String1'
    + N'String2'
    + N'String3'

    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)
  4. 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

  5. when stored procedures have variables with defaults, your auto complete intellisense does not set the default. for example, if the parameter @a is an int = 5 in the creation of the proc, your auto complete says @a = 0 --int

    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)
  6. 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)
  7. I often need to work with data sets from Excel. Instead of doing a whole "Import Data" process I would like to copy from Excel & paste into SQL Management as a temp or persisted table.

    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)
  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. It seems that the contents and closing parenthesis of EXISTS and APPLY clauses is not being indented as I would expect. So either i'm weird....or Format SQL is doing it wrong?

    I'm using (
    .....this parentheses style
    )

    What it's doing:

    SELECT *
    FROM tblA a
    WHERE 1 = 1
    .....AND EXISTS (
    .....SELECT *
    .....FROM tblB b
    .....WHERE b.Col1 = a.Col1
    ..........AND b.Col2 = a.Col2
    ..........AND b.Col3 = a.Col3
    )

    What I expect:

    SELECT *
    FROM tblA a
    WHERE 1 = 1
    .....AND EXISTS (
    ..........SELECT *
    ..........FROM tblB b
    ..........WHERE b.Col1 = a.Col1
    ...............AND b.Col2 = a.Col2
    ...............AND…

    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)
  10. I like to get clever with snippets, and it would be great to be able to create dynamic snippets for different circumstances by being able to nest one snippet within the creation script of another. That way I can parse individual functionality in different snippets, but build them together to create more complex dynamic snippets without having to maintain the same basic code in multiple individual scripts.

    I could see this working simply like:

    snippet1:
    DoThing;

    snippet2:
    $snippet1$
    DoMoreThing;

    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)
  11. At the moment to purge old tabs you need to open the tab history window and scroll to a certain point and right click and choose "Remove tabs older than this"

    This can be a bit tricky so instead could we have a button (perhaps in options?) that will prompt you for a date and purge items last closed before that date.

    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

    1 comment  ·  Tab history  ·  Admin →
    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, when refreshing suggestions with Ctrl+Shift+D, only the new changes in the current database are seen. To load the changes in another database (that I'm referring with a 3-part name in a query), I need to change the current database to that one, press Ctrl+Shift+D and then change the current database back to the original one. If it's the first time I'm accessing the other database (since starting SSMS), the changes are loaded when typing the 3-part name. However, if I had previously accessed the other database, refreshing does not work as I expect: it should drop the entire cache…

    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)
  13. Support request #137199: Provide an option to indent AND/OR entries in a WHERE clause to line up indented, but leave AND/OR entries directly underneath ON clauses:

    SELECT
            t1.col5
            , t2.col6
    FROM
            table1 t1
            INNER JOIN table2 t2
                    ON t1.col1 = t2.col1
                    AND t1.col2 = t2.col2 -- AND is directly below ON clause
    WHERE
            t1.col3 = 'Test'
            AND t2.col4 = 5 -- AND is indented underneath WHERE

    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. 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)
  15. 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?”

    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)
  16. If a View looks like
    SELECT TOP(n) FROM x ORDER BY x.clumn
    SQL Prompt shows issue EI030 although the ORDER BY is vital for the TOP (n) clause

    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. SQL Prompt fails badly in formatting window functions. As these are present at least since SQL 2014, SQL Prompt should be able to interpret them and format them accordingly.

    Example:

    I would format the LAG() function as follows:

    SELECT
    myColumn AS realColumn
    ,LAG(myColumn, 1, 0)
    OVER (
    PARTITION BY someColumn
    ORDER BY anotherColumn) AS calculatedColumn

    Try this with SQL Prompt - it's result is not very nice...

    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  ·  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)
  18. Would it be possible to treat the 'LIKE' operator the same as '=' in the Expressions\Operators settings so they are all aligned?

    select AddressID
    from Person.Address
    where ModifiedDate
    between dateadd(month, -6, getdate())
    and getdate()
    and City = 'Bothell'
    or left(PostalCode, 2) like 'CB%'
    or PostalCode = @prefix + @suffix

    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)
  19. In the setting of SQL Prompt there should be an option to create a list of servers.

    When SSMS then starts It should automatically create a connection to this list of servers in Object Explorer.

    It would be a great feature, when working with the same servers, it takes a long time to connect to servers everyday when work starts :-)

    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)
  20. When I type code I like to line up all the equals (=) signs using tabs so that all the code to the right of the equals sign lines up nicely on my screen. I find this really useful for improving readability when using column aliases, in joins, and in update statements.
    I can't find an option in SQL Prompt to do this and it annoys me when I format my SQL and all the equals signs become ragged.

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