80 results found
-
Unformat SQL
It would great if there was an un-format SQL command, which would basically un-format the SQL by removing all the carriage returns, tabs, extra spaces, etc. I know it seems odd, but we have several applications that use the SQL via external files, so the formatting will not work, and we end up manually removing all the formatting.
7 votesThis is included in SQL Prompt 7 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Ability to "automatically" remove comments from a section of code.
I really like how SQLPrompt assists with Insert Statements. However, I am then left with a large list of comments which I'm not allowed to check into source control. Therefore, I have to manually delete each line of comments.
Example:
Insert into Blah blah..VALUES ('', -- fenumber - char(3)
'', -- finumber - char(3)
'', -- fpartno - char(25) )When I enter the values, I want to be able to auto-eliminate the comments.
7 votesThis is included in SQL Prompt 7 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
format join
I would like the ability to get Format SQL to handle my JOIN formatting - I like to have my JOINs look like this:
SELECT
(columns)
FROM
sys.tables t
INNER JOIN
sys.indexes i ON t.OBJECTID = i.objectidThat is: I want to have my tables being joined lined up with the (intended) table in the FROM clause, and I like to have my JOIN condition on the same line as the joined table.
Right now, I cannot seem to get this to work - the table name and join condition are always stuck onto the same line as…
7 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 -
Enhance the Format SQL to recognize the WITH clause.
When the WITH clause is specified in the FROM clause on a JOIN, Format SQL pushes the join condition out to the WITH.
Like this:
FROM
TableA WITH (NOLOCK)
JOIN TableB WITH (NOLOCK)
ON TableA.ID = TableB.IDI would like it to behave like it does when the WITH is not present
FROM
TableA WITH (NOLOCK)
JOIN TableB WITH (NOLOCK)
ON TableA.ID = TableB.ID7 votesThis is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
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
-
Formatting SQL Transaction
It would be nice to have the code within a BEGIN TRAN and COMMIT be indented.
BEGIN TRAN
<ssss>INSERT....
<ssss>UPDATE....
COMMIT TRAN6 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
-
Option to unformat onto a single line
Often when I'm debugging code that dynamically generates SQL, I hit a breakpoint, then copy the code into an SSMS query window. All the code is typically in a single long line. I can then use SQLPrompt to format the code to read it, and potentially change it to correct errors. However, what I then often want to do is to paste the changed code back into the variable (or whatever). I'd love to be able to have an option to format the code all into a single line.
6 votesThis is included in SQL Prompt 7 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
SELECT DISTINCT starts new line and loses indentation; keep SELECT DISTINCT on same line please.
I believe the DISTINCT keyword should remain on SELECT line but at least maintain the indentation please. Thanks
6 votesWe’ve released support for this piece of formatting in version 8 of SQL Prompt.
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
-
Allow the option for SQL formatting of nested inner join on an outer join to indent the nested inner join.
When you have a nested inner join to an outer join, such as:
SELECT a., b., c.*
FROM
A a
LEFT JOIN B b
INNER JOIN C c on b.bid = c.bid
ON a.aid = b.aidIt should allow an option to indent the nested join further to show that it is nested
5 votesWe’ve released support for indenting nested joins in version 8 of SQL Prompt as part of our new formatting system.
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
-
Formating create table command
Currently when formatting a Create table command the SQL Prompt is moving the "Default" to a next line and indenting it...
like this
[insertDT] DATETIME NULL
[______INDENT] DEFAULT GETDATE()
,[ActualMU] INT NULL
[___INDENT]DEFAULT 0
,[PlannedMu] INT NULL
[___INDENT]DEFAULT 0
,[CompletedDT] DATETIME NULL
[___INDENT___] DEFAULT GETDATE()And the format that I would like to see (making easier to read) is
keeping all definition of each field in the same line, like,[insertDT] DATETIME NULL DEFAULT GETDATE()
,[ActualMU] INT NULL DEFAULT 0
,[PlannedMu] INT NULL DEFAULT 0
,[CompletedDT] DATETIME NULL DEFAULT…5 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 -
Stop auto Uppercase conversion of keywords in comments
When a word is entered in a comment block, that is the same as a keyword (e.g. FROM), SQL Prompt should not automatically convert the word to uppercase.
5 votesThis is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
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/
-
Recognize the DateTrunc function in T-SQL.
The formatter is not recognizing the newish DateTrunc function in T-SQL, so formatting and intellisense do not work on SQL statements that include DateTrunc.
4 votesShipped in version 10.13.10: https://documentation.red-gate.com/sp/release-notes-and-other-versions/sql-prompt-10-13-release-notes
-
formatting stored proc
I love to have the options so that the first line of a stored proc is just the name i.e. create proc spName and the @parms varchar(20) and following would be on additional lines
So for examplecreate proc spName
@Parm1 int
,@Parm2 intthanks
Shannon4 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 -
Inserting the AS keyword for aliases
It would be nice if one could click a button and get the AS keyword between an object name and its alias. This would help with code that doesn't use AS to separate the two. And would also help readability.
Thanks.
4 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 -
anywhere in the script file if the last line below is used it causes an error. CREATE SEQUENCE [dbo].[ReportComparisonSeq] AS INT START WI
sequences in sql 2012 is not supported by the formatter
anywhere in the script file if the last line below is used it causes an error.
CREATE SEQUENCE [dbo].[ReportComparisonSeq] AS INT START WITH 1 INCREMENT BY 1 NO CYCLE CACHE 10
go
DECLARE @Seq INT
SELECT @Seq = NEXT VALUE FOR [dbo].[ReportComparisonSeq]4 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
-
IF statement format options
Please provide the option to format IF statements as follows, based on the format settings sample.
IF @productType IN ('a', 'b', 'd', 'g', 'i', 'O', 'Q', 'X', 'Z') BEGIN
----IF @cost <= @compareprice BEGIN
--------PRINT 'Less than $' + CAST(@compareprice AS varchar(20))
----END ELSE BEGIN
--------PRINT 'Exceeds $' + CAST(@compareprice AS varchar(20))
----END
END
3 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
-
Qualify Ojects in SQL (Add square brackets)
When formatting SQL, add an option to force all possible columns/objects/whatever to be qualified with square brackets. So:
CREATE TABLE #qqqqq (aaaaa INT,bbbbb INT,ccccc VARCHAR(5));
Becomes: CREATE TABLE [#qqqqq] ([aaaaa] INT,[bbbbb] INT,[ccccc] VARCHAR(5));
Or: CREATE TABLE [#qqqqq] ([aaaaa] [INT],[bbbbb] [INT],[ccccc] [VARCHAR](5));3 votesThis is included in SQL Prompt 6.5 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
- Don't see your idea?