80 results found
-
unformat
It would be nice to select a small already formatted script, and unformat it by putting it into one line.
5 votesThis is included in SQL Prompt 7 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Merge command formatting options
Please add formatting options for the deferent parts of the MERGE command like you have for INSERT
8 votesThis feature is now included in the new SQL Prompt 8.0. For additional information see: http://documentation.red-gate.com/display/SP8/SQL+Prompt+8.0+release+notes
You can get the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for your help!
-
Indent comments consistent with code
I'm finding my comments are hanging out all on their own after the rest of my code is formatted. I would request a feature to allow comments to indent to the same level as the code on the line below.
56 votesThis feature is now included in the new SQL Prompt 8.0. For additional information see: http://documentation.red-gate.com/display/SP8/SQL+Prompt+8.0+release+notes
You can get the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for your help!
-
Add options for CASE WHEN ELSE END
I'd like to be able to configure a style for CASE statements using options like the following:
- New line after THEN
- New line before ELSE
- New line after ELSE
- ELSE match indent of CASE
- END match indent of CASE
It would also be nice to have a threshold setting (in number of characters) so the formatting settings are only applied if the length of a CASE statement exceeds the threshold.
64 votesThis feature is now included in the new SQL Prompt 8.0. For additional information see: http://documentation.red-gate.com/display/SP8/SQL+Prompt+8.0+release+notes
You can get the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for your help!
-
Autoformat should not indent begin
Instead of
IF xxx
BEGIN
sss
sss
ENDIt should format as
IF xxxx
BEGIN
ssss
ssss
ENDfor all cases where begin and end are used.
18 votesThis is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Qualify Object names and brackets
I recommend splitting the two as distinct user settings. Qualify objects should have two options: Always and Only When Necessary. The reason is that in many cases, such as a simple select from one tabe, table name in front of each field is simply clutter, adding no value. I fact, I remove them manually, as I am more interested in brackets than qualifying object names.
Brackets setting (new seeting) should have a simple Yes/No option - When set to Yes, for consistency, I recommend using brackets even in aliases (another user requested this already).
Other thant the above, SQL Prompt…
4 votesSQL Prompt now has separate settings for Qualify Object Names and Add/Remove Square Brackets, which hopefully is what you’re after.
You can get the latest version of SQL Prompt from https://www.red-gate.com/products/sql-development/sql-prompt/.
If there is something missing please let us know by opening a new suggestion.
Kind regards,
The Prompt Team
-
Lower-Case Keyword Support in Format SQL
Support lower-casing keywords instead of upper-casing them; this makes reading the query far easier as the app-specific bits are more visible
4 votesThis already exists as an option in SQL Prompt
-
XML Data Type method layout SQL support
Can not use SQL prompt to layout XML data type functions, for example this statement:
SELECT(SELECT 1 Col
FOR XML PATH(''), TYPE).value('.', 'VARCHAR(MAX)')3 votes -
Column aliases alignment
Allow alignment of column aliases in a Select statement.
22 votesThis feature is now included in the new SQL Prompt 8.0. For additional information see: http://documentation.red-gate.com/display/SP8/SQL+Prompt+8.0+release+notes
You can get the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for your help!
-
Moving commas from "end" to "start" is always buggy when comments exist
Moving commas from "end" to "start" or vice-versa is buggy when comments exist after each column or parameter. This is an issue regardless of the type of statement (SELECT, INSERT, UPDATE, CREATE TABLE/VIEW/FUNCTION/STORED PROCEDURE, etc).
Here is my original SP with commas at "end" followed by comments (hyphens are used for indentation due to HTML formating issues):
CREATE PROCEDURE dbo.MyProcedure
---- @Param1 int, --Param1 comments
---- @Param2 int, --Param2 comments
---- @Param3 int --Param3 comments
AS
BEGIN
---- SELECT Col1 , --Col1 comments
---- ---- Col2 , --Col2 comments
---- ---- Col3 --Col3 comments
---- FROM MyTable
---- RETURN
END…16 votesThis feature is now included in the new SQL Prompt 8.0. For additional information see: http://documentation.red-gate.com/display/SP8/SQL+Prompt+8.0+release+notes
You can get the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for your help!
-
Auto generated INSERT statement is buggy with commas at start
The auto-generated INSERT statement BADLY MISALIGNS data when "Place commas at start" is enabled. I've listed all the settings to reproduce the issue at the end of this post.
The comma and associated info are on a separate line (almost useless - Worse when I need to delete some of the columns). See this example (generated by SQL Prompt Pro 5.1 - hyphens represent tabs due to HTML limitations):
INSERT INTO dbo.Test
---- (FirstName
---- , LastName
---- , LocationAddress
---- , LocationCity
---- , LocationState
---- , LocationZip)
VALUES (''
---- , -- FirstName - varchar(100)
---- ''
----…11 votesThis is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Format SQL to Match Object Case
If I had the table [Address] that had the columns StreetAddress1, StreetAddress2, City, State and ZipCode defined and the following existing code was formatted:
SELECT streetaddress1,
streetaddress2,
CITY,
zipcode
FROM [address]I would like to see SQL Prompt match the case of the underlying object such that the results after formatting would be:
SELECT StreetAddress1,
StreetAddress2,
City,
ZipCode
FROM [Address]This should apply to all underlying objects (procedures [name and parameters], tables [columns, index names (used in hints), etc., functions and views; and anything else I forgot). It should also apply to variables defined within a procedure (e.g. DECLARE @MyValue…
63 votesThis is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Refactoring INSERT into UPDATE
I wish there where a shortcut/command to change a statement like
INSERT INTO Mytable(Id,Code,Label) VALUES (@Id,@Code,@Label)
in
UPDATE MyTable
SET Id=@Id, Code=@Code, Label =@LabelEven if it looks trivial on this statement, doing it with a table with 10+ Columns might be cumbersome.
79 votesWe’re happy to announce that this feature is now included in SQL Prompt 9.3. For additional information see: http://documentation.red-gate.com/display/SP9/SQL+Prompt+9.3+release+notes.
You can get the latest version of SQL Prompt from https://www.red-gate.com/products/sql-development/sql-prompt/.
Thank you for your help!
Kind regards,
The Prompt Team -
Option to highlight parenthesis matches
In order for the braces/parenthesis highlighting to work currently, you must run the native Intellisense feature in SSMS, which creates some issues with SQL Prompt. If this were written in as part SQL Prompt, we'd be able to turn off Intellisense completely.
51 votesThis is included in SQL Prompt 6.3, which can be downloaded from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Expose all formatting options in the UI
There appears to be several items (BEGIN and END tabbing, table declaration placement, number of tabs for the join condition...etc.) that happen automatically when you click Refactor that Format SQL that you can't configure in the UI.
39 votesThis feature is now included in the new SQL Prompt 8.0. For additional information see: http://documentation.red-gate.com/display/SP8/SQL+Prompt+8.0+release+notes
You can get the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for your help!
-
Improve tab & parenthesis placement of subqueries ...wherever placed in query
Would like improve tab & parenthesis placement of subqueries ...wherever placed in query ...be it in JOIN, WHERE, HAVING ...or even in SELECT ...ALSO would like option for 1st tabbed item in SELECT list to be the starting position on each row for each subsequent item which includess the placement of the 'prefixed' comma ...see below...
BEFORE (Current formatting)...
LEFT OUTER JOIN (
SELECT
f1
, f2
, f3
FROM
dbo.t1
WHERE
f9 = 'x'
) AS e
ON e.f1 = b.f1
AND e.f2 = b.f2AFTER...
LEFT OUTER JOIN
(
SELECT
f1
, f2
, f3
FROM
dbo.t1
WHERE…17 votesThis feature was released in version 8.1 of SQL Prompt as part of our rework of parentheses formatting.
If there are any missing features please let us know by creating a new suggestion.
Kind Regards,
The Prompt Team -
Disable SQL Prompt on certain blocks of code
Add a functionality of disabling SQL Prompt auto-formatting feature for blocks of code. Use SQL comments for 100% sql compatibility. Example:
SELECT 1, 2, 3
--<SQLPROPMT disable>
select 4, 5, 6
--</SQLPROPMT>
select 7,8,9in the code above, the first and third statements would be auto-formatted but not the second one.
It would be especially useful for very long scripts where a single formatting template is not an option.
64 votesThis feature is now included in the new SQL Prompt 8.0. For additional information see: http://documentation.red-gate.com/display/SP8/SQL+Prompt+8.0+release+notes
You can get the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for your help!
-
semicolon: space before/after options
Request space options for semicolons that are analogous to space options for commas (see SQL Prompt-->Options-->Format-->Commas & parentheses)
p.s. -I really don't like the current auto-insertion of a space in front of the semicolons. At the very least, the semicolon formatting should remain untouched upon running Format SQL.17 votesAs of SQL Prompt 5.2.8, spaces are no longer inserted before semicolons during a Format SQL operation. We have not added a new option, as we have found no-one who likes the spaces to be there. If we receive further feedback to the contrary then we will consider adding an option in the future.
-
Improve formatting of parameter layout
SQL Prompt 5 does not behave the same as SQL Refactor when it comes to formatting parameters that may be passed to a function, stored procedure, etc. You can increase the text wrapping, but that is not a full-scale solution. A better solution would be to allow you to want to align the parameters on new lines or put all parameters on one line ignoring the text wrapping limit.
7 votesWe’ve released a brand new formatting system in version 8 of SQL Prompt and have made further improvements since.
You can get the latest version of SQL Prompt from https://www.red-gate.com/products/sql-development/sql-prompt/.
If there is something missing please let us know by opening a new suggestion.
Kind regards,
The Prompt Team
-
90 votes
SQL Prompt 8.0 includes many improvements to the SQL formatting options. For additional information see: http://documentation.red-gate.com/display/SP8/SQL+Prompt+8.0+release+notes
You can get the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for your help!
- Don't see your idea?