674 results found
-
Auto-generate MERGE comparison clauses
One of the most tedious elements of writing T-SQL is handling of proper comparisons in the WHEN MATCHED AND ... THEN UPDATE clause of a MERGE statement.
For example, to compare a single nullable target and destination column you should compare:SRC.column <> TGT.column
OR (SRC.column IS NULL AND TGT.column IS NOT NULL)
OR (SRC.column IS NOT NULL AND TGT.column IS NULL)I'm not sure on exactly how would be best to handle this but it would be great if SQL Prompt could somehow auto-populate these clauses. Or even better would be some way to generate an entire merge statement…
6 votes -
Subquery may return more than one row when filtering on primary key.
At the moment a warning is given "Non-scalar subquery in place of a scalar" when trying to assign a variable to the result of a query filtered by the primary key column. In this case only one result can be returned so the warning appears inaccurate and wrapping the result in a TOP 1 { } ORDER BY statement seems an overkill just to remove the warning. This is kind of a special case however where the subquery contains only one table filtered with "=" on the primary key column, but it is a very common one.
Example:
DECLARE @X…6 votes -
It would be really nice if SQL Prompt had support for defining your own collapsible regions in the SQL code. Like C# in Visual Studio.
It would be really nice if SQL Prompt had support for defining your own collapsible regions in the SQL code. Like C# in Visual Studio.
6 votes -
Jumping to Begin and Jumping to END
Hello,
I try some Add ins for sql server and i found a very interesting and useful functionnality on Softtree sql assistant.
When we have a very large Stored procedure for example, with several BEGIN and END , softtree have a functionality when i place the mouse on BEGIN to [Jump to end] to find the corresponding END, the opposite is also true, when i Place the mouse on END [Jump to begginning].
This functionnlity is very very useful.
I hope you consider developing the same functionality in your SQL Prompt.Best regards,
Luis6 votes -
Automatically add Schema to tables when formatting.
Provide the option to enable automatic schema addition when necessary. And when there may be more than one candidate schema, provide a warning
6 votes -
Send to Tab History
I would like a hot key combination to send the contents of my current tab to 'Tab History' without having to close the tab. There are times that I know I will need the contents of the tab in the near future (within a few hours/days) and I don't want to have to save a hard copy to my disk.
6 votes -
Temporarily Elevate Exact Matches Over Recently Used Suggestions
I like the new feature to put recently-selected items at the top of the list for Intellisense. However, when I have typed an exact match, I would like to see Intellisense elevate that exact object to the top of the list.
For example, suppose I have recently selected a table named "dbo.OrderDetail", and suppose that there is another table in the same database called dbo.Order. With the new feature, I cannot access "dbo.Order" as the top candidate, because it is a partial match of "dbo.OrderDetail," and so SQLPrompt puts that name at the top.
In a nutshell, I would like…
6 votes -
Please allow CASE statements to start on their own line, preferably indented from the line before.
Please allow CASE statements to start on their own line, preferably indented from the line before, rather than starting way, way off to the right when there's a significant amount of stuff before them. Nested CASE statements are nearly unreadable when they're so far off the screen, for complex or nested statements.
This is a pretty simple example, but I've got real ones where the WHEN is so far over I can't even tell it's there without scrolling.
SELECT
CASE
WHEN @SPID = 3 THEN 'th'
WHEN @spid = 88 THEN 'bobasdlkfjalk;sdfjalks;djfla;skjfdlkasfjlks' + CASE
WHEN @SERVERNAME = 'bb' THEN 'a'…6 votes -
Implement all of the Find Unused Variables and Parameters functionality in Code Analysis
Currently Code Analysis does not implement all of the items that Find Unused Variables and Parameters does.
Specifically I know it's missing:
- Declared variables that are used before a value is assigned
- Assigned values that are never usedEx.
With this code:DECLARE @Test NVARCHAR(1)
DECLARE @Test2 INT
DECLARE @Test3 DATESET @Test = 1
SET @Test = N'Test' + @Test2
Code Analysis will flag the DECLARE for @Test for having a NVARCHAR of size 1 and @Test3 for not being used, but it will not flag @Test2 for being used before a value is assigned to it…
6 votes -
Fix this bug with your software and Visual Studio 2017
Have it not break Visual Studio 2017 even when selecting that you don't want it to be integrated with it.
The problem is that we could no longer get latest version after installing your software and then rebooting. Here is an email that I just sent to a group of people that have had the issue for at least a week before we narrowed the problem...Guess what!?
We found what caused the issue, can reproduce it, and fix it.
The issue is with Redgate’s software, specifically SQL Prompt for us.
This is the reason that John never had the…6 votes -
Customizable colors for database objects in object explorer
It would be very useful to have the ability to define a color for certain database objects such as tables or columns. With that feature, objects could be marked individually and would be highlighted, for example columns with an index on them. Other users would be able to directly see this and take it into account in their query design for example. These settings should also be saved in the source control if desired.
6 votes -
Script Temporary Table Declaration from Query
Context menu item to take the current query under the cursor and script out an appropriate DECLARE @table or CREATE TABLE #table to match the names and types output from the query.
6 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 -
Tab History - sort or filter on evironment
Allow me sort or filter the tab history list based on the environments that I have defined.
6 votes -
Ability to Save invalid objects list instead of re-running entire database each time
When you are working with a rather large database it would be nice to be able to save a list of invalid objects to come back rather than having to re-run through the entire database again.
6 votes -
Add or detect missing 'N' on inline string literals containing Unicode characters
This is an extension of:
https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/6779217-add-n-to-unicode-type-literal-stringsExcept I would like to improve this feature so that it is not limited to just variable declarations, but also for inline string literals.
For example, if an inline string literal contains a unicode character, it should have the N prefix. If anything it should probably be a Code Analysis rule rather than formatting because this change can absolutely impact code behavior. So I think it's better suited to be an analysis rule.
5 votes -
Surround highlighted text with
Surround highlighted text with 'thing' instead of replacing it. Like in azure data studio or visual studio, pressing "(" will surround the highlighted text instead of replacing it. I have created surround snippets to surround the highlighted text with what I want; it's just not as good to use.
5 votes -
New Case When Intend option
The new option would allow intending from alias (in alias = expression notation)
5 votes -
Copy as IN clause should follow formating setting
I use the Copy as IN clause a lot and think it is one of the most helpful functions in SQL Prompt.
It would be even better if it could format the IN list according to the Style setting you have selected.
This is how it is created when right clicking on the function
ContractsId IN
(
234151,
234321,
239990,
228809,
240808,
231809,
240021,
230876,
231739,
239555,
240972
)If I then use format SQL it changes it to the way I want it, without line brakes for each row but in relation to the other statement.
It would be…
5 votes -
Copy results grid data to Excel as an XML spreadsheet to preserve data types
When working on a management server with SQL Prompt and SSMS, we usually don't have Microsoft Office with Excel installed there. This makes it very cumbersome to use the current feature of SQL Prompt to export grid results to an Excel file as there is no application available on the server to process the file.
Instead, I often use a very nice feature in SSMSBoost that copies to grid results data to an XML spreadsheet which can then be pasted into Excel on your client, preserving data types. The regular copy/paste from SSMS to Excel only copies text data from…
5 votes
- Don't see your idea?