184 results found
-
Empty Line Before and After Multi-Line Statements
Complex multi-line statements are much easier to read when separated by an empty line above and below them. Please add an option to turn on "Empty Line Above/Below Multi-Line Statements".
5 votes -
Format CTE closing parenthesis
It would be nice to have an option under Formatting Style -> CTE to allow closing parenthesis behavior, just like the opening parenthesis one:
- Place closing parenthesis on new line
- Closing parenthesis alignment13 votes -
Align "then"
Please add an option to align "then" keyword and the expressions.
Current format:
declare@fooidint=(case
_______________________when@barId=7then2
_____________________when@barId=800then1
_____________________else5
_________________end
__________________);Suggested format:
declare@fooidint=(case
_______________________when@barId=7then2
____________________when@barId=800_then1
_____________________else________________5
________________end
__________________);14 votes -
Comment Word Wrap
Hi!
I would be nice to have the option to enable word wrap for the comments as well.
The number of maximum characters for the comment should be aligned with "Wrap lines longer than" for SQL statements.19 votes -
Add additional option for "remove unnecessary brackets" which would keep brackets around syntax highlighted words. "Status", "Type",etc.",
Add additional option for "remove unnecessary brackets" which would keep brackets around syntax highlighted words.
"Status", "description", and "Type" are examples of special words that are syntax highlighted, but they aren't full reserved keywords, so would want the brackets kept.How to configure and prevent SQL Prompt from removing brackets around Syntax highlighted words?
We only have the following settings:
a) Options > Inserted Code > Special Characters > Brackets > Enclose identifiers within square brackets [] = NO (which is our desire)
b) Options > Format > Styles > Actions > run format > Add/remove square brackets = YES,…31 votes -
End column guide lines
I think SSMSBoost has this feature: being able to add configurable guide lines to limit the query writing space to a specified number of characters/columns. This is very handy as I always want to keep my code narrow, within the 80-char limit. Currently, I have to install SSMSBoost for it... Could this please be added to SQL Prompt? This is probably a quick feature to implement and would be tremendously useful. Thanks.
3 votes -
LINQ Style SQL
What I’m proposing, would change the way we type our SQL scripts. I’m not suggesting we try to pass or force through a new SQL standard. I’m simply suggesting a new dynamic “view” of the SQL syntax, which would allow for a more natural support of intellisense. With today’s IDE’s this simply doesn’t work. Intellisense doesn’t know where to pull the “what” from. The “what” comes from the “where”, (the FROM clause).
The underlying SQL script itself, would still comply with the SQL standards. This “view”, would perform three tasks: 1) allow the end-user to type their SQL more like…
11 votes -
Expand a view or views referenced in a query
I think it would be great if SQL Prompt had the functionality to expand a view that is used in a query. So if you have this schema:
CREATE TABLE dbo.Person
(
PersonID INT IDENTITY(1, 1)
PRIMARY KEY,
LastName VARCHAR(30),
FirstName VARCHAR(30),
);
GOCREATE TABLE dbo.Student
(
StudentID INT IDENTITY(1, 1)
PRIMARY KEY,
PersonID INT,
StudentNo VARCHAR(100)
);
GOCREATE TABLE dbo.Class
(
ClassID INT IDENTITY(1, 1)
PRIMARY KEY,
ClassName VARCHAR(100)
);
GOCREATE TABLE dbo.ClassRoster
(
ClassID INT,
StudentID INT
);GO
CREATE VIEW dbo.Students
AS
SELECT
S.StudentID,
P.LastName,
P.FirstName,
S.StudentNo
FROM
dbo.Person AS P
JOIN dbo.Student AS…17 votes -
Replace all tabs with spaces
Setting the option to use spaces instead of tabs for intending (our house policy) only works for new tab presses.
I would like a simple action that would replace all tabs in the current document with spaces -- using the tab-to-spaces value as set in options. Sublime Text has this and I use practically every time I edit anything.57 votes -
Format SQL Code on opening file
It would be awsome if there was an option that would format an SQL Script automatically after opening it in SSMS / VS. So if you load a file it would be formatted automatically with your selected formatting style. It would be great too if this auto format option could be switched on and off in the Options.
17 votes -
Make semi-colon optional at END(;)
Semi-colons are automatically added at every END reserved key word. Make this optional.
END(;)
END TRY(;)
END CATCH(;)This just look weird to everyone
BEGIN
....
END(;) <=== don't want it here... there's an ELSE continuation.
ELSE
BEGIN
END(;)1 vote -
Do not consider code flagged for no formatting when formatting.
If I have a very large script with the majority of it with formatting disabled, or even with just a highlighted small area... the ctrl-K,ctrl-Y formatting seems to consider the parts it will not be formatting. Example: code in a separate window will format instantly while in a window with 100k lines with same code highlighted it will take a long while. This seems to indicate that it is considering all of the code even though it is only formatting a small piece.
2 votes -
move options settable under "SSMS > SQL Prompt > Options > Format > Style" page out of the Settings file and [back] into Style file
In version 7 the Style option FormatActionRemoveSquareBrackets was removed from the .sqlpromptstyle Style file into the .settings Settings file. I would like it moved back into the Style file, along with all other Style options settable under "SSMS > SQL Prompt > Options > Format > Style". See https://productsupport.red-gate.com/hc/en-us/requests/122489 for additional details.
2 votes -
16 votes
-
Conditionally place ON keyword on new line if exceeds specified wrap margin
My default preference is to maintain the ON keyword without a new line. I would like to be able to CONDITIONALLY place the ON keyword on a new line if, and only if the ON keyword together with the associated ON condition exceed a configurable wrap threshold.
Example:
-- Yield this >>>>
SELECT *
FROM Person.Address
INNER JOIN Person.StateProvince
ON StateProvince.StateProvinceID=Address.StateProvinceID
-- >>>> instead ofSELECT *
FROM Person.Address
INNER JOIN Person.StateProvince ON StateProvince.StateProvinceID=Address.StateProvinceID
-- Assuming the JOIN clause exceeds the wrap length
-- <<<This is particularly useful if the "Place JOIN table on new line" is NOT selected…
3 votes -
IN clause - indent according to parenthesis rules according to the expression they are in
It would be nice if the IN clause were formatted like a logical function that returns a value so that it followed the options and rules for parentheses and were indented according to its place in the logical expression. (paying attention to the ANDs and ORs if present)
2 votes -
Arithmetic expressions - format consistently with logical expressions
Arithmetical expressions and compound logical expressions all consist of operations and expressions with parentheses and orders of precedence. All of these should have the options for aligning operands, aligning parentheses, adding parentheses to make the default orders of precedence explicit. All expressions are subordinate to clauses so they should be indented under WHERE, ON, SELECT, WHEN.
1 vote -
Convert code to dynamic Code
Convert selected CODE or a complete stored procedure to Dynamic SQL Code.
16 votes -
Template based formatting with different
Template based formatting.
Select your text and right click, format according to template... then select the appropriate template of your choice.8 votes -
Auto generated INSERT needs a column blacklist
Add the ability to exclude columns from appearing in the auto-generated INSERT statements. I have to manually remove certain columns every time.
9 votes
- Don't see your idea?