186 results found
-
Apply casing formatting as I type, but without the suggestions.
Currently, SQL Prompt either allows you to apply casing all at once with the Apply Casing Options, or it does it as you type if Enable Suggestions is turned on.
Please add a feature so that I can have casing applied as I type, but without the suggestions.
4 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 -
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 -
align aliases
Please, separate options to align aliases for columns and tables..... I love aligned column aliases, but table aliases advance too far right, unnecessarily.
7 votes -
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 -
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 -
Ability to format SQL text externally
It would be nice to have ability to format the documents automatically, have an API or command line command for that. For example to force format when check-in code.
11 votes -
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 -
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 -
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 -
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 -
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 -
formatting of OVER clause
Would like to control formatting of the OVER clause. E.g I would like the complete "(Partition by ... order by ...) as xyz" on one line, but today it's overrdden by other options.
29 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 -
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 -
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 -
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 -
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
- Don't see your idea?