184 results found
-
More Casing/Capitalization Options
Regardless of the source table, we would like the option to force table, column, and alias names to lower case. (We integrate databases from multiple sources and our queries look like a mess when half of the columns are upper case and half are lower).
Example:
SELECT dp.PROJID AS cpprojid,
pld.suffix AS projectsegment,
IP.projectnumber AS innprojid
FROM DEL.PROJ AS dp
INNER JOIN DEL.viewprojectlvldetail AS pld
ON pld.PROJID = dp.projid
LEFT OUTER JOIN inn.PROJ AS IP
ON dp.PROJID LIKE IP.cpproj_id + '%'I think this is hard…
7 votes -
Add option to indent code between BEGIN TRANSACTION and COMMIT TRANSACTION
Someone else has submitted this suggestion and it is marked completed. However, it does not seem to do so in my version of SQL Prompt (9.2.6.6145)
9 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 -
open source sql prompt's formatting module.
open source sql prompt's formatting module.
1 vote -
AND keyword for WHERE and JOINs on new line
There is no option in CLAUSES > JOIN to place AND on new line (Right aligned to INNER) and in Data (DML) there isn't an option to put AND on new line. Lots of tables I join on I am joining on 2 columns and I prefer to have the AND a.col1 = b.col1 on a new line as well.
4 votes -
Automatically create variables for use with generating full INSERT statements
Currently the behavior for inserting a full INSERT statement is that it produces something like this:
INSERT INTO dbo.ContactPictures
( InterActionPersonalContactID ,
InterActionFirmContactID ,
ImageFileStoreFilePathSegment ,
Source ,
ManuallyCreatedByUserAccountName ,
DateTimeLastUpdated
)
VALUES ( 0 , -- InterActionPersonalContactID - int
0 , -- InterActionFirmContactID - int
'' , -- ImageFileStoreFilePathSegment - varchar(256)
'' , -- Source - varchar(20)
N'' , -- ManuallyCreatedByUserAccountName - nvarchar(40)
GETDATE() -- DateTimeLastUpdated - datetime
)Hard-coded values are rarely what's needed, though; it would be very useful if it could generate variables and use them in the statement, like this:
DECLARE @InterActionPersonalContactID INT = 0…
8 votes -
Format of Valid Selected Code when there is invalid code in the script (Take 2)
Version 9.2.5.6073
I would like to request that script validation be limited to the selected text during Format SQL.This is a duplicate of a Completed feature (Bug) submitted on version 7. https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/16611622-formatting-of-valid-selected-code-when-there-is-in
I see recent comments on the original request but you may not be addressing since it is marked completed.To Replicate:
Put 3 lines below in a new Window in SSMSSOME BAD TEXT
GO
SELECT 1 FROM dbo.PersonNow select All of Line 3 after the GO Statement. Right-click, Format SQL
Should get following error:
"Error inserting semicolons" ...
Script parsing errors:
Line 1 Col: 1…5 votes -
IF Statement block formatting is messed up
IF Statement block formatting is messed up
IF 1 = 1
BEGIN
PRINT 'DO STUFF'
ENDbecomes
IF 1 = 1 BEGIN
PRINT 'DO STUFF';
END;which is what I want...I want to leave the BEGIN END indention
5 votes -
Outlining
Would be great to be able to add user specific outlining, so that you could add + & - where ever you choose in a sql script to collapse down certain parts. The CRM system that I support has a create contact table import with 200 columns which is regularly used and this functionality would be great when having to resort to using this import etc...
6 votes -
Indent statement after IF when not enclosed by BEGIN/END block
if blah=1
____return 1;if blah=2
_begin
_return 2;
_end
else
_return 0;13 votes -
Vertical rivers - cobol style
When writing SQL I don't think procedurally, which means I don't think about nested, indented "blocks" unless I'm actually using some procedural style SQL extensions like try/catch, if, case (which is a little procedural expression inside a set based statement), and so on.
Because of this, I like to align various different "types of things" in a statement to create vertical rivers.
So, for example, insert, update, select, from, join, where, group by, having, and order by are all aligned on the left. You might think of this as "column 1 - sql keywords".
Then come column names, table names…
1 vote -
Aliases
On SQL Prompt Aliases section I would like to have on custom aliases when I add a new a dropdown or a list view where I can pick object instead of me writing the object name. it would be even better if it has an option to show only object not already added with alias.
1 vote -
Ending Subquery parenthesis aligned to opening parenthesis - option please
Similar to the CTE request https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/19545028-format-cte-closing-parenthesis
Aligning the closing parenthesis on its own line, in the same column as the opening paren, makes the subquery stand out, as well as making the alias stand out.
9 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 -
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 -
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 -
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 -
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 -
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 -
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
- Don't see your idea?