173 results found
-
Indentation of clauses following alter table
Indent the clauses that may follow an alter table statement. They currently are on the same line or split but not indented.
3 votes -
Whitespace: Tab to indent, then spaces for alignments
Whitespace: I picked up an indenting/alignment pattern from a Stack Overflow thread that solves an abundance of arguments: Please provide the option for using Tabs to indent the line, and then use spaces for alignments following the first character.
3 votes -
Autofix : SC002 – Script should end with empty line
SQL prompt currently removes the empty line at the bottom of a script, which then break rule SC002.
Can format include a setting to add a blank line at the bottom of a script, and also autofix sc002 issues.
3 votes -
Option For Aliases (Only For Custon Alias)
Hi
it is better to SQL prompt use only aliases define with user.need option in Aliases : Only For Custom Aliases
Sorry For My Bad English
3 votes -
Ignore Begin statements with CTE immediately after
SQL Prompt's "Insert semicolon" function behaves weirdly when a CTE is a the start of a control loop. For example, if I have this code:
IF (1=1) BEGIN
WITH numbers AS (
SELECT 1 AS num
UNION SELECT 2
UNION SELECT 3
UNION SELECT 4
)
SELECT * FROM numbers
END;SQL Prompt will format it as
IF (1=1) BEGIN;
WITH numbers AS (
SELECT 1 AS num
UNION SELECT 2
UNION SELECT 3
UNION SELECT 4
)
SELECT * FROM numbers;
END;While the code runs, I think the semicolon after "BEGIN" makes very little sense. First, the beginning…
3 votes -
Add one additional Parenthesis style
My Teams would prefer this option:
xxxxxxxxxxxxxx (
xxxxxxx,
xxxxxxx )Opening parenthesis on the first line, and closing parenthesis on the last line.
Second and following lines indented one stop. This display seems to strip out the leading spaces.
3 votes -
Make parentheses rules customizable (where what applies) instead of a global setting
I have different wants for parentheses rules: Collapse short content or not, Having Parentheses on separat lines or leading the content, etc. It all depends on the context. But currently the setting is global.
I would like to be able to define one rule for, say, Primary Key definitions, and another rule for, say, the columns of a table.
I would want one thing for Control Flow sections, and another thing for Variables declarations.Today, I need to choose which one to be dominant (or stop using FORMAT SQL on the entire script, but just highlight the block where I…
3 votes -
Closing parenthesis and content indention on APPLY/EXISTS not indenting
It seems that the contents and closing parenthesis of EXISTS and APPLY clauses is not being indented as I would expect. So either i'm weird....or Format SQL is doing it wrong?
I'm using (
.....this parentheses style
)What it's doing:
SELECT *
FROM tblA a
WHERE 1 = 1
.....AND EXISTS (
.....SELECT *
.....FROM tblB b
.....WHERE b.Col1 = a.Col1
..........AND b.Col2 = a.Col2
..........AND b.Col3 = a.Col3
)What I expect:
SELECT *
FROM tblA a
WHERE 1 = 1
.....AND EXISTS (
..........SELECT *
..........FROM tblB b
..........WHERE b.Col1 = a.Col1
...............AND b.Col2 = a.Col2
...............AND…3 votes -
Align BETWEEN with comparison operators
It's currently possible to align operations in WHERE which is great, but BETWEEN is not aligned.
Example - currently:
WHEREModifiedDate BETWEEN DATEADD(MONTH, -6, GETDATE()) AND GETDATE()
AND City__________= 'Bothell'
OR LEFT(PostalCode, 2)= 'CB'
OR PostalCode_______= @prefix + @suffixExpected:
Example - currently:
WHEREModifiedDate_BETWEEN DATEADD(MONTH, -6, GETDATE()) AND GETDATE()
AND City________= 'Bothell'
OR LEFT(PostalCode, 2)= 'CB'
OR PostalCode_______= @prefix + @suffix3 votes -
Don't allow for aliases that match snippet acronyms
What I sometimes run into, is that a table gets an alias (by SQL prompt), that matches an acronym for a snippet. Then, whenever I'm writing out my query, while calling the table by alias, snippet manager replaces the alias with the full snippet. Which can be annoying as Ctrl-Z doesn't work.
My suggestion would be to check the snippet manager before assigning aliases and not have them overlap.
Thanks.3 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 -
Trimming trailing spaces in comments
It would be cool if SQL Prompt was able to remove trailing whitespaces/tabs not only for T-SQL, but also for comments.
It's not something crucial, but rather nice-to-have
3 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 -
prevent Prompt SQL from destroying bookmarks
If format SQL makes chnages - it destroy saved marks
This occurs even when line bookmarked line hasnt (visibly) changed
Very frushtrating3 votes -
Formatting Styles should include Global Style parameters
Global formatting options like "Insert Semicolons", "Add brackets to all identifiers" etc should be part of a formatting style, this way changing a formatting style can also quickly switch between these options.
Currently even after changing a formatting style these options on the screenshot below had to be manually changed one by one, it's inefficient to say the least.2 votes -
2 votes
-
DDL comma placement
When making a CREATE TABLE statement, I would like to have the comma at the beginning of the line.
I've set the lists.placeCommasBeforeItems property to true, but it's not working for the DDL statement.So either fix the comma placement option for DDL statements or add an option for it.
2 votes -
Include some menu options directly in Style format
Would it be possible to include the attached menu options in the Style format configuration? It would be very helpful to have it when Formatting SQL instaead of executing it after the Format.
At least, "Apply Casing Options", "Qualify Object Names" and "Remove Square Brackets".2 votes -
Maintain TABs before comments
We have some comments placed in the code preceeded by one or more TABs. When formatting SQL all these TABs are replaced by one WHITESPACE.
Is it possible to maiantain these TABs?See attached examples.
2 votes -
Semicolons deletion
We would like an option to get rid of the semicolons. You can only configure the whitespace. When we apply "Format SQL" many semicolons are inserted in our code and we don't wnat them.
Is it possible to add an option when formatting Style for eliminating semicolons?2 votes
- Don't see your idea?