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. 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)
  2. 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)
  3. Provide the option to enable automatic schema addition when necessary. And when there may be more than one candidate schema, provide a warning

    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. I would like to only affect the placement of commas in a column list, without applying other formatting options. This would work similar to Ctrl-B, Ctrl-B to remove brackets or Ctrl-B, C to insert semicolons, in that no other formatting would take place.

    There are times I have a rather well-formatted script but it has been written with commas at the start of the line and I prefer them at the end. A new shortcut would toggle placing commas at the start or end of the line without affecting other formatting within the script.

    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)
  5. Is it possible to add a hard return after the /* comment */ block so code doesn't keep formatting after the comment

    Currently:
    /* comment */ UPDATE User
    SET Modified = CAST('2018-12-20' AS datetime)
    WHERE id = 255454

    Suggestion
    /* comment */
    UPDATE USER
    SET Modified = CAST('2018-12-20' AS datetime)
    WHERE id = 255454

    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)
  6. Version 9.2.5.6073

    I would like to request that script validation be limited to the selected text during Format SQL.

    This is a duplicate of a Completed feature (Bug) submitted on version 7. https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/16611622-formatting-of-valid-selected-code-when-there-is-in
    I see recent comments on the original request but you may not be addressing since it is marked completed.

    To Replicate:

    Put 3 lines below in a new Window in SSMS

    SOME BAD TEXT
    GO
    SELECT 1 FROM dbo.Person

    Now select All of Line 3 after the GO Statement. Right-click, Format SQL

    Should get following error:
    "Error inserting semicolons" ...

    Script parsing errors:
    Line 1 Col: 1…

    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)
  7. IF Statement block formatting is messed up

    IF 1 = 1
    BEGIN
    PRINT 'DO STUFF'
    END

    becomes

    IF 1 = 1 BEGIN
    PRINT 'DO STUFF';
    END;

    which is what I want...I want to leave the BEGIN END indention

    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)
  8. Complex multi-line statements are much easier to read when separated by an empty line above and below them. Please add an option to turn on "Empty Line Above/Below Multi-Line Statements".

    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)
  9. Allow an option when saving / running a file that you format the sql to the format selected. Will make sure the whole team follow the standards and does not forget to run the formatter.

    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)
  10. If I create a query with an ORDER BY clause such as ORDER BY 1, 2; SQL Prompt will flag the ORDER BY and report ORDER BY clause with constants.

    It would be nice to have an option to have SQL Prompt replace the constant(s) with the correct column names.

    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)
  11. I am a brand new user (1 day) for SQL PROMPT. I managed to get my parameter statements to align, but there is no option on my custom formatting style to align my set statements. See the attached jpg. Trying to get it to look like the yellow highlighted area.

    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. DAX Studio has a splendid feature that I think is missing from SQL Prompt and could be rather easily implemented. In DAX Studio one can switch with one mouse click between putting commas before or after the column names. The "before" option greatly speeds up debugging but such formatting should not be left in production. In prod we want to have commas after the column name. Would it be possible to add a quick action or option to SQL Prompt so that commas are immediately placed at the end or beginning of column names? I know there are formatting styles…

    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)
  13. 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)
  14. Using the parentheses option "expanded, to statement" for DDL, I would expect a constraint to appear with the opening parenthesis under the start of the constraint (eg, the "f" in a foreign key constraint) as follows:

    MyColumn int not null
       foreign key references SomeTable
       (
          someColumn
       )
    

    But it actually appears at the end of the same line as the constraint, and the entire contents are indented from that position:

    MyColumn int not null
       foreign key references SomeTable(
                                          someColulmn
                                       )
    
    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)
  15. It would be nice to have the ability to mass import/export aliases.

    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)
  16. Add ability to add or remove square brackets without having to edit the settings for which direction you want it to go.

    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)
  17. when I paste after "Copy as In clause", got contents like this:

    IN
    (
    1, --comma at behind
    2
    )

    I hope got this:

    IN
    (
    1
    ,2 --comma at before
    )

    please provide option, thanks.

    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)
  18. Add an option to add a space between a function call, such as COUNT(), and FROM so that we don't end up with code like SELECT COUNT()FROM table. That doesn't happen when I select "Add spaces around parentheses" in the global parentheses options. The only way I've been able to get SQL Prompt to preserve that space is to select "Add spaces around parentheses" in the Function calls options, but I don't want a space between the function name and opening parenthesis.

    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)
  19. Currently we have a standard of placing new line before and after conditions with indent accordingly such that:

    a=1
    AND
    b=2

    Current version only does:

    a=1
    AND b=2

    This is pretty much the only thing lacking from being able to just auto format all our procedures with a single click.

    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)
  20. These are the typical formatting styles I use that I would like to see definable in SQL Prompt. Currently, I use a style that gets me close then manually format the remainder to the code:

    Regarding the desired format of

    1) SELECT, FROM, JOIN, WHERE, GROUP BY, HAVING, ORDER BY all lined up
    2) TAB after SELECT, followed by first 'column'
    3) Subsequent columns on separate lines and lined up with the first one.
    4) TAB after any CASE followed by first WHEN
    5) Subsequent WHENs lined up with first one
    6) TAB before THEN (i.e. indented one tab from…

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