184 results found
-
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 -
semi colon placed on new line if statement is on more than one line
Add option to leave semicolon on same line if statement only use one line.
My idea is an additional to the idea captured in the "semi colon placed on new line" request.
It would be nice to have checkbox for the semicolon-on-new-line option to not move the semicolon to a new line if the statement is ONLY one line.
For example:
SELECT TOP 10 * FROM dbo.Table
;
should be
SELECT TOP 10 * FROM dbo.Table;
instead, but
SELECT TOP 10 *
FROM dbo.Table
;
will remain unchanged by formatting.10 votes -
Preserve indentation of multiple-line comment blocks
In SQL Prompt 8, multiple-line comment blocks (surrounded by /* */) are automatically indented to the SQL code surrounding them when formatting.
Can you please add an option to preserve the indentation of these blocks? My team keeps most comment blocks left-aligned for consistency and readability, but SQL Prompt will automatically move them when formatting.
This was not an issue in SQL Prompt 7, so all of our comment blocks are now moving when upgrading to SQL Prompt 8 and there is no option to preserve them. Thank you.
23 votes -
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 -
Align ON in JOIN Statements
I really like the latest formatting flavours. Aligning the equivalency symbols in joins is nice, but could I also align the ON keyword? Or pick which one I want to align on.
SELECT *
FROM table1 a
JOIN Table2 b__ON a.foo = b.foo
JOIN Tab3 c___ ON b.fa__= c.fa23 votes -
Format dynamic SQL
We use a lot of dynamic SQL. I'd like to be able to format dynamic SQL that is in a string, eg. and NVARCHAR. e.g.
Input: DECLARE @sql NVARCHAR = '
SELECT foo from bar where foobar = ''foobarred''
'I'd like to be able to highlight the text inside the NVARCHAR for formatting. SQL Prompt would need to handle doubled quotation marks as in my example above.
18 votes -
Align equals sign in UPDATE
Provide an option in Styles to let the right hand side of clauses in UPDATE statement be aligned.
Example:
UPDATE~~EDSV
SET~~~~~eDocSessionID~~~~~~~~~~~~~~~~~~~~~=~CONSV.eDocSessionID~,
~~~~~~~~eDocSessionKey~~~~~~~~~~~~~~~~~~~~=~CONSV.eDocSessionKey~,
~~~~~~~~eDocSessionValue~~~~~~~~~~~~~~~~~~=~CONSV.eDocSessionValue~,
~~~~~~~~eDocSessionValueTextStyleOverride~=~CONSV.eDocSessionValueTextStyleOverride~,
~~~~~~~~eDocSessionValuePositionOverride~~=~CONSV.eDocSessionValuePositionOverride~,
~~~~~~~~eDocSessionValueLockdown~~~~~~~~~~=~''
FROM~~~~eDocStd2.dbo.eDocSessionValues~AS~EDSV
~~~~~~~~INNER~JOIN~#changedOrNewSessionValues~AS~CONSV~ON~CONSV.eDocSessionID~=~EDSV.eDocSessionID
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~AND~CONSV.eDocSessionKey~=~EDSV.eDocSessionKey;44 votes -
Create new Setting to only enclose SQL Keywords in square brackets
I don't want to use brackets for my code (unless I have to). So, for example, dbo.Orders is fine, but dbo.Order isn't. It would be nice if SQL prompt caught this and automatically enclosed the SQL Keyword "Order" in square brackets (i.e. dbo.[Order] AS o)
52 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 -
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 -
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 -
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 -
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 -
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 -
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 -
16 votes
-
Convert code to dynamic Code
Convert selected CODE or a complete stored procedure to Dynamic SQL Code.
16 votes
- Don't see your idea?