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

14 results found

  1. Occasionally I must edit the definition of a computed column. As editing a computed column is not allowed from SQL, would be nice to generate a script that would facilitate this update, similar to the rename script. (Ie, drops indexes, drops the field, recreates the field, and recreates the indexes.)

    Obviously this is similar to the functionality of the Smart Rename, except doesnt' have to edit Views and Sprocs, so hopefully most of the logic could quickly copy over from there!

    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)
  2. With the Script as INSERT feature, give the option to just copy the CREATE TABLE and INSERT INTO statements to the clipboard.

    I regularly create Temp Tables to store query results when working through a SPROC. (Generate a dataset, throw it in a temp table to use for later, drop it at the end of the SPROC. More efficient than doing one massive Select with Subqueries.) When you Script as INSERT, that's created in a new tab. I copy that code and go back to the original tab.

    Would be convenient if I could copy straight to the clipboard and…

    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)
  3. When using the Script as Insert, it generates the Create Table with the table name as #temptable. If you want to change that name, you have to then change it in the Create, Insert, and Drop locations.

    Would be nice if this defaulted as a snippet placeholder so that editing one would edit the other two as well.

    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. The way I work when creating complicated scripts is creating all the SELECT statements and then convert them to CTEs of my final query.
    It would be nice if you could convert SELECT into CTE

    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)
  5. F12 to Script views and stored procedures as ALTER is one of my favorite features. I would love it if F12 when I am on a table generates a CREATE TABLE script for that table.

    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. 'Script object as alter' (F12) works in ALTER statements but not in CREATE OR ALTER statements like. It would be nice if it also worked for the latter.

    Example:
    'CREATE OR ALTER VIEW [MyView] AS SELECT 1 AS Col1;'
    If I right-click on [MyView] in the above code snippet and select 'Script object as ALTER' (or hit F12), I would expect SQL Prompt to script the object if it exists.
    Currently nothing happens.

    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)
  7. No CREATE SQL is displayed in the suggestions window when hovering over any CLR objects, or scripting the object as alter. The code returned is just a comment saying:

    -- No creation SQL available for this object type

    The CREATE/ALTER statement can easily be built by querying the relevant system tables. SSMS does it when you script the object and other Redgate products such as SQL Compare and SQL Source Control do it just fine, not sure why SQL Prompt would have been left out.

    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

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  8. When scripting an object from the Object Explorer, for example with right-click -> Modify or Script as... CREATE To, the tab created has a default name determined by SSMS, for example "SQLQuery45 - database01.sql". It would be great if this naming was the same as when you click F12 on an object name in a script, where the new tab is named the same as the object, for example "dbo.SomeStoredProcedure - database01.sql".

    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)
  9. Would like the option to Script Object as Alter (F12) from the Object Explorer pane. So, for example, when I click on a stored procedure in the Object Explorer and click F12 (or right click and select Script Object as Alter), it would open a new tab with the stored procedures scripted as alter.

    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)
  10. I would like to see the Script Object as Alter (F12) feature to work with synonyms. However, I am aware that a synonym cannot be altered - instead I suggest to generate a script containing a DROP and a CREATE statement.

    That way one could bring up the code of the referenced object by selecting the synonym, pressing F12, selecting the referenced object and pressing F12 again.

    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)
  11. 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)
  12. 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)
  13. Highlight a SELECT stmt and create a temp table definition from it. You often need to create #tables and you have a select to fill it with. However, you have to either create the #table manually or do a SELECT INTO into a real table and then script it out. It would be nice to be able to just take my SELECT and be able to get the #table definition for it.

    31 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. When I hover over an object and get the pop-up script for that object (proc/view/function) I would like the ability to have the script default to ALTER instead of CREATE.

    99.9% of the time I manually have to edit the Create to be an Alter, this would save SO MUCH time.

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