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

173 results found

  1. On our team we are very particular about the order of our joins as they are written in the query. I would like to request an option to format joins so the table you are joining on is the first item in the join. In the example below you join to tableb so the first ON clause is tableb, subsequently on the tablec join the first join is on objects from tablec.

    SELECT (columns)
    FROM tablea a
    INNER JOIN tableb b ON
    a.id = b.id
    INNER JOIN tablec c ON
    b.id2 = c.id

    To:
    SELECT (columns)
    FROM tablea a
    INNER…

    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)
  2. I have set up rules to format as such:

    Select *
    From Employees e Join
    People p On e.PersonID = p.PersonID;

    Each table/view object aligned on a new line. However, when I convert to a "cross join", they don't generate a new line, they concatenate on the same line, like such:

    Select *
    From Employees e Cross Join People p;

    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)
  3. It would be appreciated if you could enhance the SqlPrompt Formatting Styles functionality. I believe this would go in the STATEMENTS >>> Data (DML) section.

    I'd like to continue using the "If there are multiple expressions" item of the "Place GROUP BY / ORDER BY expression on new line" drop-down. But I'd like those expressions to be indented; they presently all left-align to the GROUP BY.

    Also, while you're there, it seems that it would be good to also have add an "If longer than wrap column" option to the above-mentioned drop-down.

    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)
  4. Be able to refactor INSERT statement into UPDATE statement that has SELECT rather than VALUES i.e. "insert into xxx select from".

    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)
  5. The current parenthesis options I have set for an INSERT INTO (DML) statement, only appear to work for the list of columns, but NOT for the list of values in the VALUE clause. I'm unsure why this behaviour is different, but this inconsistency seems like a bug.

    I have provided a screenshot where you can clearly see the parentheses are not aligned correct in comparison with the INSERT statement.

    Ultimately I would like for the formatting to be overall consistent.

    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)
  6. In cases where there is SELECT DISTINCT or SELECT TOP(n) .. I would l like the option to format my table's columns to appear on the next line and indented 1 tab or set of spaces in from the SELECT and not necessarily aligned with DISTINCT or TOP in the line above.

    SELECT DISTINCT
    COLUMN1,
    COLUMN2
    FROM ...

    instead of

    SELECT DISTINCT
    Column1,
    Column2
    FROM ...

    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)
  7. I have included a Sample SQL script. This script shows the desired formatting. I can't find any way to prevent the OPENJSON from being sent to a new line. For example:

    SELECT *
    FROM OPENJSON(@JSON, '$.Doc') AS OJ
    CROSS APPLY OPENJSON(OJ.Value)
    WITH (ID int) AS CAOJ

    becomes

    SELECT *
    FROM OPENJSON(@JSON, '$.Doc') AS OJ
    CROSS APPLY
    OPENJSON(OJ.Value)
    WITH ( ID INT ) AS CAOJ

    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)
  8. Have Formal SQL Actions be included in the formatting style file. This way when a team shared a standard we do not have to share the file and screen shots of the Options menu to manually sync to maintain team consistency on code checkin.

    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)
  9. Currently in Visual Studio the option to "Enclose identifiers within square brackets []" option will be set to true on startup requiring a user to turn it off every time they load Visual Studio.

    This option when set to false should remain that way even after a restart of Visual Studio the same way it does in SSMS.

    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)
  10. Similar to the "Prefixes to ignore" option in Options > Inserted code > Aliases, could we have a "Postfixes to ignore" option to allow use to set words at the end of a tablename to ignore when generating aliases.

    Currently I have to keep the custom aliases list up to date, whereas this would do that automatically.

    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)
  11. Add /* / multi line comment shortcut for highlighted code in text editor. See SSMSBoost pro for example CTRL+.

    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

    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)
  12. Option (such as a check box) to omit active style formatting of comment lines between /* and */. Similar to SQL Prompt formatting off/on without the added code lines.

    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)
  13. Currently SQL Prompt inserts SQL full INSERT script or EXEC SP in multiline while it might be useful for INSERT statement, but most of the times I have to realign them into a single line. It would be good if we have the option to choose wheather to add statement in single line or multi line? and its more usefull if we have shortcut to switch the inserted statement between formats?

    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. When I am composing a script in Multi-Script, I'd like to have the editing settings available. Include variable/column name completion, keyword formatting, indention, etc..

    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)
  15. When Place Begin - End statements on new line is selected it doesn't appear to work as part of an If statement. This makes the begin and end difficult to find

    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

    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)
  16. We have code littered with IIFs that we would like to convert to CASE. Logically this is straightforward, but achieving it swiftly is proving more difficult. A regex takes care of the simple ones, but the ugly ones with nested functions across multiple lines and all sorts are proving far more difficult.

    Would it be possible to add a feature to SQL Prompt to refactor IIFs into CASE statements? Thanks

    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)
  17. The columns listed in the CTE are not formatted like the columns in the AS clause. On larger CTE's, the listed columns may be hundreds or characters long so we get
    with xx
    ( a, b, c, d, e, ...) AS
    (Select a,
    b,
    c,
    d,
    e,
    ...

    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)
  18. 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)
  19. I would like to control the list behavior on a clause by clause basis so that I can separate the formatting on my DECLARE statements differently than lists within SELECT and INSERT statements. As it stands, these are conflicting changes. So, the only way to get each variable declared on a separate line is to also have every column in other statements on a separate line. I'd like to be able to do BOTH of these:

    DECLARE @GUID UNIQUEIDENTIFIER = NEWID(),
    @Char CHAR(1) = 'A',
    @Int INT = 1,
    @Datetime DATETIME = CURRENTTIMESTAMP,
    @Decimal DECIMAL(18,10) = 1.0,
    @Date DATE

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