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

172 results found

  1. It's currently possible to align operations in WHERE which is great, but BETWEEN is not aligned.
    Example - currently:
    WHEREModifiedDate BETWEEN DATEADD(MONTH, -6, GETDATE()) AND GETDATE()
    AND City
    __________= 'Bothell'
    OR LEFT(PostalCode, 2)
    = 'CB'
    OR PostalCode
    _______= @prefix + @suffix

    Expected:
    Example - currently:
    WHEREModifiedDate_BETWEEN DATEADD(MONTH, -6, GETDATE()) AND GETDATE()
    AND City
    ________= 'Bothell'
    OR LEFT(PostalCode, 2)
    = 'CB'
    OR PostalCode
    _______= @prefix + @suffix

    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)
  2. 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)
  3. SQL Prompt is removing prefixes from column names used as parameters in function-calls. For example, if you use Cross Apply to a system function:
    SELECT *
    FROM sys.tables AS T
    CROSS APPLY sys.fnlistextendedproperty('blah','schema',schemaname(T.schemaid), 'table', T.name, null, null)
    It removes "T." from schema
    id and name in the parameters list. This means I have to add them back in if the column names are ambiguous. I don't see a setting for this, and have Prompt set to add prefixes to columns in the other clauses. So it'll add "T." to a column in the Select clause, and remove…

    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. 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)
  5. It would be nice to have ability to format the documents automatically, have an API or command line command for that. For example to force format when check-in code.

    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

    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. Please, separate options to align aliases for columns and tables..... I love aligned column aliases, but table aliases advance too far right, unnecessarily.

    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)
  7. The only edge Apex has over SQL Prompt formatting, at least for my use, is being able to organize long equations. If I am using a large number of columns for an equation, I'd like to place each new column on a new line.

    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)
  8. Currently, SQL Prompt either allows you to apply casing all at once with the Apply Casing Options, or it does it as you type if Enable Suggestions is turned on.

    Please add a feature so that I can have casing applied as I type, but without the suggestions.

    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)
  9. Regardless of the source table, we would like the option to force table, column, and alias names to lower case. (We integrate databases from multiple sources and our queries look like a mess when half of the columns are upper case and half are lower).

    Example:
    SELECT dp.PROJID AS cpprojid,
    pld.suffix AS project
    segment,
    IP.projectnumber AS innprojid
    FROM DEL.PROJ AS dp
    INNER JOIN DEL.view
    projectlvldetail AS pld
    ON pld.PROJID = dp.projid
    LEFT OUTER JOIN inn.PROJ AS IP
    ON dp.PROJID LIKE IP.cpproj_id + '%'

    I think this is hard…

    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

    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. Someone else has submitted this suggestion and it is marked completed. However, it does not seem to do so in my version of SQL Prompt (9.2.6.6145)

    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

    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. What I sometimes run into, is that a table gets an alias (by SQL prompt), that matches an acronym for a snippet. Then, whenever I'm writing out my query, while calling the table by alias, snippet manager replaces the alias with the full snippet. Which can be annoying as Ctrl-Z doesn't work.

    My suggestion would be to check the snippet manager before assigning aliases and not have them overlap.
    Thanks.

    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)
  12. open source sql prompt's formatting module.

    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)
  13. There is no option in CLAUSES > JOIN to place AND on new line (Right aligned to INNER) and in Data (DML) there isn't an option to put AND on new line. Lots of tables I join on I am joining on 2 columns and I prefer to have the AND a.col1 = b.col1 on a new line as well.

    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. Currently the behavior for inserting a full INSERT statement is that it produces something like this:

    INSERT INTO dbo.ContactPictures
    ( InterActionPersonalContactID ,
    InterActionFirmContactID ,
    ImageFileStoreFilePathSegment ,
    Source ,
    ManuallyCreatedByUserAccountName ,
    DateTimeLastUpdated
    )
    VALUES ( 0 , -- InterActionPersonalContactID - int
    0 , -- InterActionFirmContactID - int
    '' , -- ImageFileStoreFilePathSegment - varchar(256)
    '' , -- Source - varchar(20)
    N'' , -- ManuallyCreatedByUserAccountName - nvarchar(40)
    GETDATE() -- DateTimeLastUpdated - datetime
    )

    Hard-coded values are rarely what's needed, though; it would be very useful if it could generate variables and use them in the statement, like this:

    DECLARE @InterActionPersonalContactID INT = 0…

    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  ·  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. 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)
  16. 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)
  17. Would be great to be able to add user specific outlining, so that you could add + & - where ever you choose in a sql script to collapse down certain parts. The CRM system that I support has a create contact table import with 200 columns which is regularly used and this functionality would be great when having to resort to using this import etc...

    6 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. if blah=1
    ____return 1;

    if blah=2
    _begin
    _
    return 2;
    _end
    else
    _
    return 0;

    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

    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)
  19. When writing SQL I don't think procedurally, which means I don't think about nested, indented "blocks" unless I'm actually using some procedural style SQL extensions like try/catch, if, case (which is a little procedural expression inside a set based statement), and so on.

    Because of this, I like to align various different "types of things" in a statement to create vertical rivers.

    So, for example, insert, update, select, from, join, where, group by, having, and order by are all aligned on the left. You might think of this as "column 1 - sql keywords".

    Then come column names, table names…

    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)
  20. On SQL Prompt Aliases section I would like to have on custom aliases when I add a new a dropdown or a list view where I can pick object instead of me writing the object name. it would be even better if it has an option to show only object not already added with alias.

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