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

176 results found

  1. Please can the "Add quotes and commas" action conform to the current active style's Commas setting?

    So if the setting is "Place commas before items", then the action should also place the commas before.

    At the moment, I have to run a Format SQL action after using Add quotes and commas, which is cumbersome.

    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  ·  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. When typing a string preceded with 'N' (like N'string value'), when you type the closing quote it gets doubled. Hard to explain, but easy to reproduce. Just type these two statements into SSMS to see the difference:

    SELECT 'Bill' As FirstName
    SELECT N'Bill' As FirstName

    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  ·  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. So… Copy as IN Clause. Love it, but let’s improve it. Let’s say we have the following output…

    ProductID ProductDesc
    1 SQL Prompt
    2 SQL Search
    3 SQL Compare

    If we use Copy as IN Clause on the ProductID column, we get:

    IN
    (
    1,
    2,
    3
    )

    Which super…. However those IDs mean nothing to me in 6 months time when I’m now having to modify my code. What would be awesome, is if I can select both ProductID and ProductDesc, then hit Copy as IN Clause, and get the following output:

    IN
    (
    1, -- SQL Prompt
    2,…

    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

    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. Merge Command Formatting

    For MERGE commands there is no way to make the conditional requirements with 'ON' follow the same style as JOIN's ON. I noticed back on 5/17/2017 there was a closed 'Merge command formatting options' through the User Voice, stating that an experimental feature was available for SQL Prompt 7.4. What happened? In my 10.1.7.15015, within the formatting styles, there is no area for MERGE like there is for JOIN.

    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

    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. 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)
  6. 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)
  7. 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)
  8. I would like to expand upon suggestions others have made regarding adding custom formatting and analyzers.
    I have recently been trying to implement SQL Prompt for our team, and I have struggles with a lack of customization, opinionated options that don’t reflect our needs, and some bugs.
    What would have solved this issue for me would have been the ability to add custom formatters and custom analyzers.

    Custom Formatters
    Since SQL Prompt gets the position of tokens from IAlignmentProvider.FinalAlignmentForToken I suggest that the API couple simply be plumbed into this method, if a plugin is attached it would call the…

    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)
  9. 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)
  10. 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)
  11. When collapsing CASE expressions shorter then XXX, the END has no space if there is a preceding parenthesis.

    Example1 = CASE t1.Col004 WHEN 1 THEN t1.Col006 END,
    Example1 = CASE t1.Col004 WHEN 1 THEN TRY_CONVERT(int, t1.Col006)END

    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)
  12. PERSIST_SAMPLE_PERCENT is a new feature in SQL Server 2016 SP1 CU4.

    SQL Prompt does not think this is a valid UPDATE STATISTICS statement:

    UPDATE STATISTICS dbo.MyTable(MyStat)
    WITH FULLSCAN, PERSIST_SAMPLE_PERCENT = ON;

    It is valid and the correct syntax. SQL Prompt should be updated to format this correctly.

    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)
  13. When saving/opening file automatically untabify it.

    (select all then edit|advanced|untabify selected lines)

    Some how, some way, despite telling everyone to set convert tabs to spaces we constantly get tabs in our SQL code. It would be really nice to just have it automatically convert to spaces so I can save a few clicks.

    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

    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)
  14. Formatting a SQL batch which contains

    BACKUP DATABASE Databasename
    TO URL = N'URL'
    WITH CREDENTIAL = N'Credential'

    leads to

    BACKUP DATABASE Databasename
    TO URL = N'URL'
    WITH AS CREDENTIAL = N'Credential'

    the AS between with and credential is wrong.

    Please fix :-)

    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

    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)
  15. When formatting SQL, it would be good to have the option to put the item following an AND/OR on a new line and align it, so instead of:

    WHERE
    OutgoingResults.LoadDateKey = 20191106
    AND OutgoingResults.FeedName = 'TestFeed'

    we have

    WHERE
    OutgoingResults.LoadDateKey = 20191106
    AND
    OutgoingResults.FeedName = 'TestFeed'

    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

    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)
  16. Hi there. Currently, SQL Prompt formats an invocation of a sproc like this:

    exec sproc @param1 = ?,
    @param2 = ?,
    @param3 = ?

    I'd like to be able to change this into:

    exec sproc
    @param1 = ?,
    @param2 = ?,
    @param3 = ?

    Thanks.

    10 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)
  17. Some of us would like the option for formatting of table declarations to not only align [tabify] column names (indented one tab), but also columnize/tabify the data types and nullability so that table definitions are grid-like. Constraints per column are are far more variable and therefore require more of a free format or sometimes pushing them to subsequent lines, but at minimum, the ColumnName, DataType and Nullability should be optioned to columnize by default.

    When there are hundreds or thousands of tables in a db schema, I'm used to scanning table definitions, and having them organized grid-like saves my eyeballs…

    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

    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. It would be nice to have an option to not but square brackets around aliases as it's our style to not do so. We find it makes the aliases unnecessarily long,since most of our aliases are 1 or 2 letters.

    For example

    SELECT
    T.[TableId],
    T.[Name]
    FROM
    [dbo].[MyTable] T

    vs

    SELECT
    [T].[TableId],
    [T].[Name]
    FROM
    [dbo].[MyTable] [T]

    Currently we have to go back and rename an alias to itself so that the square brackets go away.

    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

    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. Feature to automatically add column alias with the name of the column.
    E.g.:

    SELECT Column1
    FROM Table1 AS t1

    changes to:

    SELECT Column1 AS Column1
    FROM Table1 AS t1

    If the name can not be found add a dummy-alias like Exp1

    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

    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 realize my title is very vague.

    Basically, I would like more control options over how styles are applied. Maybe I'm just really weird in how I format my SQL, but it seems like no matter how hard I try, I can never get the styles the way I want them.

    I realize that it's impossible to make it perfect. But the basic idea is to get the formatter to do what you would normally do the majority of the time.

    For example....the majority of the time, I prefer the following...

    For JOIN clauses, all join criteria is in the…

    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

    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?