80 results found
-
Command Line "Reformat All Files In Folder" and pre-Commit
Opening over 2500 code objects to set a baseline format, required by a large customer, is a daunting manual task.
Many of Red Gate's tools provide command-line functionality.
Please add it to Prompt so we can bulk (re)format SPs, UDFs, Triggers. Integration into the commit-path (we use SVN) would be ideal for standardized check-ins (Commits).
Can't recall whether a style is exportable... (License key awaited at new employer) Should be able to point to UNC location for the style to use.
109 votesBulk operations for formatting and code analysis were added as part of SQL Prompt 10.7
-
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!
-
Automatic semicolons
Include an option when reformatting SQL to automatically add semicolons at the end of each statement if they are missing.
While in most cases SQL Server 2005 and 2008 don't require this, the 2008 docs mention that a future version might.
and it may also be helpful if trying to move code from SQL Server 200x to a dialect which does require them.85 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 -
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!
-
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!
-
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/
-
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!
-
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/
-
Highlight --TODO and --HACK comments
When a --#TODO: or --#HACK is written on our code, it could be helpful to highlight it in order to give an alert to the reader. In addition it can be very helpful to let the user to configure the pattern (i.e. --#MyTerm).
46 votesWe’ve released support for highlighting TODOs in version 9 of SQL Prompt as part of its new code analysis feature.
You can get the latest version of SQL Prompt from https://www.red-gate.com/products/sql-development/sql-prompt/.
We’re marking this request as completed, but if you feel strongly about being able to configure the term, please feel free to open a new suggestion.
Kind regards,
The Prompt Team
-
Support a common intending option for SELECT
Sample query (spaces marked with underscores):
SELECTstaffId, staffName, a
FROM__personnelSELECT and FROM have whitespace after them to align the rest of the statement. This formatting style is tedious to maintain and almost nowhere to be found in real codebases or on the web. Please support the more common code style:
SELECTstaffId, staffName, a
FROMpersonnelJust one space.
41 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!
-
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!
-
Format CTE
Allow users to specify how CTEs should be formatted. Right now I get:
WITH cte
AS (
SELECT
Title
,FirstName
,LastName
FROM
isales.dbo.salesteam
)
SELECT
Title
,FirstName
,LastName
FROM
cteWhat I would like is:
WITH cte
AS
(
SELECT
Title
,FirstName
,LastName
FROM
MyTable
)
SELECT
Title
,FirstName
,LastName
FROM
cte26 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!
-
Warning on delete and update statements if no WHERE clause is specified
It would be nice to get a warning on delete or update statements if you did not specify a where clause.
23 votesSQL Prompt 7.2 displays execution warnings before executing DELETE or UPDATE statements without a WHERE clause. You can download the latest version from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Change formatting of IF statements.
When an IF is short and does not have a BEGIN END on it, have it format to a single line.
Right now if you have
IF @Parameter1 = 0
RETURN -1
IF @Parameter2 = 0
RETURN -2I would like it to be:
IF @Parameter1 = 0 RETURN -1
IF @Parameter2 = 0 RETURN -2which would make it more compact.
23 votesThis feature was released in version 8 of SQL Prompt.
If there are any missing features please let us know by creating a new suggestion.
Kind Regards,
The Prompt Team -
"commarise"
When copying a list of items from something like Excel, it would be lovely to have a feature in Prompt which would highlight the list, hit a key stroke and it would place quotes around each item and a comma after them.
It would stop me bashing the quote + arrow + comma keys at the speed of light.
22 votesThis is included in SQL Prompt 7 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
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!
-
SQL PROMPT 5 - Simple, but toggle indenting of else if statements
Allow the option to NOT indent else if statements. Each of the ELSE IF statements gets further indented and for large SQL it becomes indented off the screen. I can imagine this pattern could apply else where but for this specific use case our STPs that have this condition i simply can't format the sql because it requires me to horizontally scroll. Allowing me to disable indenting ELSE IF statements would solve this problem instantly.
21 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!
-
Unwrap sp_executesql
Frequently I need to debug application generated SQL obtained via Profiler. Parameterized queries are often implemented with sp_executesql.
I love using Format SQL to make a single line monster query into something I can actually read. But when it's stuck in an spexecutesql call the format function doesn't touch it. I have to:
Remove "Exec spexecutesql".
Remove the apostrophes around the query SQL. For big queries this is really painful, especially if the query itself contains apostrophes.
Remove the apostrophes around the parameter defenitions.
Move the parameter definitions to the top and add a DECLARE.
Move the parameter…18 votesThis feature was released in version 7.3 of SQL Prompt.
If there are any missing features please let us know by creating a new suggestion.
Kind Regards,
The Prompt Team -
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/
- Don't see your idea?