663 results found
-
Add option to wrap lines when concatenating strings
Sometimes I set a variable equal to many strings concatenated together using the "+" syntax. When I format with Regdate, there is no option to wrap lines in this case. Everything ends up on the same line as the SET, so the lines often get very wide and go off screen.
It would be great if there was an option to wrap text if things got too wide horizontally.
One solution would be a setting to format concatenated strings like this:
SET @Variable = N'String1'
+ N'String2'
+ N'String3'4 votesHi Amanda,
Would the ‘wrap lines longer than X characters’ option in the formatting styles help with this?
Tim
-
Feature to make variable declarations persistent while testing
Allows you to define (on a per tab/session basis) a list of variables you would like to be declared before running the highlighted piece of SQL.
Reason: I like to put all of my "magic numbers" in variables at the top of the proc. This works great for code readability, but it's a pain to troubleshoot because now everywhere the variable is used, you need to copy that variable declaration above whatever code you are testing in order for it to work.
4 votesThanks for the suggestion Chad. We think this is a nice idea, we’ll wait to see how others in the community comment and vote before taking it forward.
Tim
-
Expand Wildcards with alias and equal sign
When I expand Wildcards I would like it like
Select col1 = tb.col1
col2 = tb.col2
FROM tb4 votes -
Lists formatting for Columns and Parameters should be treated separately
The starting item in a List of Columns for a SELECT statement is fine to place on the same line as the SELECT, however, for EXEC <proc name that is probably longer> it looks odd to have the Parameters line up at the end. This should be a separate choice for EXEC Parameters. I chose the "commas before" style for most everything, but prefer the "default" layout for EXEC proc parameters.
4 votes -
Refactoring INSERT into MERGE
Refactoring INSERT into UPDATE is definitely useful, but most of us are familiar with these. The complex MERGE statement is a mess, and a clean way to generate that would be fantastic!! Especially since you can figure out the primary keys, etc..
4 votes -
Control D to duplicate selected text
When text is selected, Control D would create a copy of that text. If no text is selected, the current line of the cursor will be duplicated.
Much like the behavior of Excel to carry down cell values (and a popular Visual Studio plugin), this will allow users to keep the text on their clipboard to paste it over part of the SQL that was just duplicated (like the contents of a where clause).
4 votes -
Move the Options - Styles configuration to the individual Style definition page
Options - Styles pane contains, for example, "Apply column alias style" and its drop-down. This does not belong as a universal style setting, among others.
Please move it to the "Formatting Styles" configuration dialog.
This is because many practitioners either do not know about the "alias = column" capability in T-SQL, or don't like it, or it's contrary to company standards. The ability to use this form, which IMO is more brain-friendly, ought to be on the Formatting page as it is, in fact, a significant style element.
Thanks.
4 votes -
Prefixes in function parameters
SQL Prompt is removing prefixes from column names used as parameters in function-calls. For example, if you use Cross Apply to a system function:
SELECT *
FROM sys.tables AS T
CROSS APPLY sys.fnlistextendedproperty('blah','schema',schemaname(T.schemaid), 'table', T.name, null, null)
It removes "T." from schemaid and name in the parameters list. This means I have to add them back in if the column names are ambiguous. I don't see a setting for this, and have Prompt set to add prefixes to columns in the other clauses. So it'll add "T." to a column in the Select clause, and remove…4 votes -
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 -
Allow importing of .settings file, and setting Code formatting/snippets folders and default formatting style to be done via Command line
I would like to be able to better automate our onboarding process for new developers by helping ensure their snippets folder, formatting style folder and default formatting style are correctly setup. Additionally we would like to be able to automatically import settings from UNC/source control for them. This reduces the inevitability that something is missed when trying to follow a setup guide we have to additionally maintain. Thanks!
4 votes -
Use named parameters when encapsulating as new stored procedure
It would be nice if the "Encapsulate as new stored procedure" logic used named parameter style so I don't immediately get ST008 in my code which calls the new proc.
4 votes -
sonarqube
Have SonarQube plugin that will do code analysis using your rules rather than TSQL or PLSQL plugins
4 votes -
Automatic Alias from Table Name
(5 previous votes)
Rather than individually defining aliases per table, add an option to use capitalised letters of tables/views to define an alias.
eg.
Customer = C
mem_Membership = Mcus_StateCustomer = SC
aReallyLongTableName = RLTN
view_CustomerMembership = CM
4 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 -
SQL Prompt -> Tab History -> add datetime stamp column
Currently it shows the filename and servername, but it would really help to have the datetime of when it was executed. Sorting the columns would be an added benefit as well.
4 votes -
Inconsistently Advised to Use Alias For CTE (ST010)
Simple statements do not flag this:
WITH CTE1 AS (SELECT TestColumn FROM dbo.TestTable)
SELECT a.TestColumn FROM CTE1 a
INNER JOIN CTE1 b ON a.TestColumn = b.TestColumn;However, more complex statements do:
WITH CTE1 AS (SELECT TestColumn FROM dbo.TestTable),
CTE2 AS (SELECT TestColumn FROM CTE1),
CTE3 AS (SELECT TestColumn FROM CTE2)
SELECT CTE3.TestColumn FROM CTE3
INNER JOIN CTE2 ON CTE3.TestColumn = CTE2.TestColumn;In the final select clause, both CTE2 and CTE3 are flagged with 'Use alias for all table sources' (ST010).
Seems a bit OTT to suggest references to CTEs are aliased? I accept that a CTE defines, in relational terms,…
4 votes -
Show SELECT INTO within the Summarize Script pane
Within the Summarize Script pane, it would be helpful to differentiate between a SELECT statement (which returns output to the user) and a SELECT INTO statement (which creates a table and loads data into it).
4 votes -
MS_Description supporting hyperlink when SQL Prompt is showing the tooltip
I'm currently working on a database with some really complex calculations which are saved then in a table. Putting these formula in the MSDescription is a pain as it cannot be shown correctly in the appearing tooltip text.
A nice Feature would be that I'm able to add a Hyperlink in the MSDescription which is pointing to the document in our SharePoint Server (or Wiki or whereever...).
Or - if this is not working, would it be possible to define a Special RedGate Attribute/Property (e.g. MSDescriptionRedGate) below the MSDescription which is containing a hyperllink and this…4 votes -
Change quote completion behavior within Openquery or dynamic SQL strings
I really like auto quote completion, but when I am working with an openquery statement or dynamic sql where I am having to escape quotes by doubling them up, I find myself fighting the "helpful" behavior of quote completion either refusing to add a second quote or it adds too many quotes.
So, my suggestion is that the quote completion feature check to see if you are trying to add quotes within a quoted string and change its behavior to either not do quote completion or to (even better) automatically add escaped quotes.To illustrate the problem and my proposed…
4 votes -
The automatic aliasing of tables and views could be improved
Say I typed the code below, just to look at the content of a table (don't slam me for the SELECT *, this is pseudo code).
SELECT * FROM dbo.Address AS A
dbo.Address was automatically aliased as "A", which is fine.
Now, let me double-click on "Address" and replace this table name with another one, just because I want to save time:
SELECT * FROM dbo.Affiliation AS A AS A
This time, the table was automatically aliased again, but your feature does not seem to care if the table was already aliases.
So now, the table is double aliased.
3 votes
- Don't see your idea?