80 results found
-
RECEIVE statement - Format SQL ignores
;
RECEIVE TOP(1)
@h = conversationhandle,
@t = messagetypename,
@b = messagebody
FROM SimpleQueueTargetFrom the Service Broker Workbench on Simple Talk.
It only moves the semicolon to a separate line. No errors. Ignores "comma at start".
And, yes, the @'s above probably start in column 1, when they're actually in col 5.
1 voteThis 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 -
Surround list of values with quotation marks and separate by commas
when creating a WHERE colname IN ('a','b','c')
it would be nice if you could paste a set of rows from excel into SSMS and then add the quotation marks and commas
i.e.
A
B
Cbecomes
'A',
'B',
'C'7 votesSQL Prompt 7 now has an “Add quotes and commas” feature which can be accessed by selecting the block of text and tapping ctrl to bring up the Actions List. You can download the latest version from http://www.red-gate.com/products/sql-development/sql-prompt/
-
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 -
Remove extra space between statements option is Needed
SELECT
*
FROM
Temp1--Remove this kind of extra spacing between statements option is Needed
SELECT
*
FROM
Temp2--Remove this kind of extra spacing between statements option is Needed
SELECT
*
FROM
Temp310 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/
-
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/
-
Remove trailing spaces
Option to remove trailing spaces from script lines. This can be done via search/replace functionality but it would be nice to have this taken care of automatically during the SQL code reformatting
7 votesVersion 8 of SQL Prompt allows you to do this as part of its 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
-
Give Format SQL the ability to convert X.Field1 AS NewFieldName format to FieldName = X.Field1
We have a lot of legacy code that is written as
SELECT Field1 as Name1, Field2 Name2 FROM Table X
(Sometimes they use AS when setting the alias, othertimes they do not).I would love the ability to convert this to
SELECT
Name1 = X.Field1
, Name2 = X.Field2
FROM Table XBoth having the ability to switch between Name = Value and Value AS Name and to auto add the alias to all fields.
9 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 -
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
-
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
-
Add brackets to all database objects
Similar to the existing Qualify Object Names and the other pending request to fix case of all object names, I would like to have an option to add brackets added to all database object names (columns, tables, schemas) where they are missing.
13 votesThis is included in SQL Prompt 6.5 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Format "case" keyword also in uppercase
When formatting a case statement I want the case keyword to show in uppercase just like the when and end keywords. Now initially it uppercases CASE but when running SQL format it turns it to lowercase (bug?) See example below of the current format behaviour.
SELECT case WHEN 1 = 1 THEN 1
ELSE 0
END1 voteThis should be fixed in the latest build of Prompt
-
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 -
Incorrect capitalization of system functions
The SQL Prompt formatter incorrectly tries to capitalize (whether automatically while I type or using the formatter) system functions that are missing a database prefix. For example, SQL Prompt doesn't try to capitalize:
sys.fn_listextendedproperty
but it WILL capitalize
fn_listextendedproperty
as soon as I hit space, regardless of the CASE setting in SQL Prompt's options. Obvious, a capitalized FN_LISTEXTENDEDPROPERTY does not work: the function is case-sensitive.
There does not appear to be a way around this, not even by setting Format -> Styles -> Case -> Buit-in functions to "Leave as is". That only resolves the problem for the manual formatter:…
1 voteThis is fixed in the latest build of Prompt, if you’re still having problems please let me know.
-
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/
-
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!
-
Its a very nice tool who made developer life very easy and do a major and boring task of code formatting by just pressing CTRL+K+Y.
Its a very nice tool who made developer life very easy and do a major and boring task of code formatting by just pressing CTRL+K+Y.
i need a feature who can help developer very much like 1)If there is a SQL Insert query and i select a field it should highlight the value assigned to that selected field because finding this become more painful in formatted code.7 votesSQL Prompt now contains the Highlight Matching Objects feature: https://documentation.red-gate.com/display/SP7/SQL+Prompt+7.1+release+notes#SQLPrompt7.1releasenotes-Highlightmatchingobjects
-
Case formatting
Case formatting to allow option of capitalising initial letter only - e.g. Select, not SELECT or select.
1 voteThe latest version of Prompt has the casing option UpperCamelCase which will case SELECT as Select.
-
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/
-
Option to align AND predicates with WHERE
Would love to be able to have all predicates at the same indent level ie:
WHERE something = yetsomethingelse
AND somethingelse = anotherthing9 votesWe’ve released support for formatting options such as this in version 8.0 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
- Don't see your idea?