674 results found
-
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 -
Post execution
Automate a task after a query execution.
Like, after execute a long query, send-me a email, or if the query run from a long time do something or start a job, another query, kill the original query.
Be able to enable this trigger after start a query will be nice too.1 vote -
Add space between closing parethesis of a function call and FROM
Add an option to add a space between a function call, such as COUNT(), and FROM so that we don't end up with code like SELECT COUNT()FROM table. That doesn't happen when I select "Add spaces around parentheses" in the global parentheses options. The only way I've been able to get SQL Prompt to preserve that space is to select "Add spaces around parentheses" in the Function calls options, but I don't want a space between the function name and opening parenthesis.
4 votes -
Can we have a keyboard shortcut for "Script Object as ALTER"?
Can we have a keyboard shortcut for "Script Object as ALTER"? You had it before but it isn't available with the latest version.
2 votes -
RedGate In Clause
When redgate is writing the "in clause" for us based on selected cells it would be nice if it also put the column name in the clipboard when all fields selected are from the same column,
1 vote -
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 -
conditions new line after
Currently we have a standard of placing new line before and after conditions with indent accordingly such that:
a=1
AND
b=2Current version only does:
a=1
AND b=2This is pretty much the only thing lacking from being able to just auto format all our procedures with a single click.
4 votes -
Support SSDT for SQL Prompt
Create Install Package for installing SQL Prompt in SSDT. SSDT is a VS shell, so Prompt should be easily incorporated.
5 votes -
COPY AS ALTER BUTTON
Hello,
So I love the suggestion feature where I'm able to type in an object and the code appears to copy. Home run with this feature I can't thank you enough for it.
I was wondering if it would be possible to expand on it though.
Here is a sample. I'm looking to alter an object, let's say a stored proc...
I usually begin by typing EXEC <name> to trigger the suggestion for stored procs to give me the object.Once the suggestion finds the object, the script contents appears in a side window.
Using the COPY button in the…
1 vote -
inserting table adds database name
When you select a table from the intellisense list
Precede the table name with the database name as well
Currently it is only inserting the schema name in front of the table name
i.e. dbo.<table name>It should be <database name>.<schema name>.<table name>
2 votes -
Make the Issues List more useful - Rule Disable, Specific Help, Hide Issue in List
The list is useful to drive code positioning, but that's all it does. Rules like ST011 that go against authoritative SQLPass presentations are noise. Yes, we can click the SQP Menu, nav to manage, scroll down, and finally disable, save, then refresh... (out of breath!). Just right-click and Disable rule, which also refreshes the list. That kind of useful RC-Menu. And instead of having to go to the Rule Maint to see exactly what the rule is enforcing, RC-menu has "Show Issue Help" in a bubble, built in. And for those cases where a rule isn't to be shut down,…
4 votes -
Provide support for "Suffixes to ignore" in "Insert code > Aliasing" options
We use a data warehousing strategy that creates potentially dozens of tables for multi-class entities in the data warehouse, so we have many tables that end in "core". This leads SQL Prompt to alias the object with a final "C" that we then remove manually. For example, our InstanceCore and Database_Core tables are aliased to "IC" and "DC" when we would prefer "I" and "D" respectively.
Can SQL Prompt's Aliasing capabilities be extended to support "Suffixes to ignore" just like the existing "Prefixes to ignore"?
1 vote -
Menu option: 'Normalize Line Endings'
Sometimes line-endings get messed up by source-control (looking at you Git) and "intellisense" will give you lots of green squigglies that you'd rather not commit to the branch.
A good menu option for SQL Prompt would be 'Normalize Line Endings' with a sub-menu selection of 'Windows' or 'Unix'. Then fire off a regex expression powered search and replace on the file. It's fairly easy to do manually with a Ctrl+Shift+F in Visual Studio, but in SSMS, it's more complicated to do so manually, I think.
Git does this to me once in a while, and I have to open the…
9 votes -
Paste copied table rows as seperate entities for snippets
I would like the ability to copy a set of items then treat them as separate items for formatting purposes. For example, say I grabbed these values from a results table.
'A'
'B'
'C'I would want to be able to paste them with the formatting I'd use for an insert, so they would look like this:
('A'),
('B'),
('C'),As it works right now though, copying and using the $PASTE$ placeholder will generate this.
'($PASTE$)',
'(A
B
C)',1 vote -
Ignore Begin statements with CTE immediately after
SQL Prompt's "Insert semicolon" function behaves weirdly when a CTE is a the start of a control loop. For example, if I have this code:
IF (1=1) BEGIN
WITH numbers AS (
SELECT 1 AS num
UNION SELECT 2
UNION SELECT 3
UNION SELECT 4
)
SELECT * FROM numbers
END;SQL Prompt will format it as
IF (1=1) BEGIN;
WITH numbers AS (
SELECT 1 AS num
UNION SELECT 2
UNION SELECT 3
UNION SELECT 4
)
SELECT * FROM numbers;
END;While the code runs, I think the semicolon after "BEGIN" makes very little sense. First, the beginning…
3 votes -
Purge tabs
At the moment to purge old tabs you need to open the tab history window and scroll to a certain point and right click and choose "Remove tabs older than this"
This can be a bit tricky so instead could we have a button (perhaps in options?) that will prompt you for a date and purge items last closed before that date.
8 votesThanks for the suggestion!
We’re actively reviewing this suggestion alongside some others for Tab History. We’ll update again here when we progress.
-
Mark same columns in JOIN conditions
It helps avoiding join on the same column (especially at inner join).
Example:
UPDATE A SET Column1 = B.Column2 FROM TableA AS A INNER JOIN Table B ON A.Column3 = A.Column3.
It happens usually by accident. The statement should be:
UPDATE A SET Column1 = B.Column2 FROM TableA AS A INNER JOIN Table B ON A.Column3 = B.Column3.14 votes -
Pin tab
So, Starred Tabs have been added, which is 1/2 of the capability I asked for a while back with "pinned tabs". We can remove tabs from Tab History either:
1 tab at a time.....100s of times per day for me
Older than x date - which does NOT work for me, because tabs that I want to keep around aren't always used every daySo, now that we can "Star" tabs, how about letting us clean up Tab History a little more cleanly. Such as:
1 tab at a time
Older than x, except Starred Tabs
Older than xThis…
2 votes -
Shortcut to move commas from start to end and vice versa.
I would like to only affect the placement of commas in a column list, without applying other formatting options. This would work similar to Ctrl-B, Ctrl-B to remove brackets or Ctrl-B, C to insert semicolons, in that no other formatting would take place.
There are times I have a rather well-formatted script but it has been written with commas at the start of the line and I prefer them at the end. A new shortcut would toggle placing commas at the start or end of the line without affecting other formatting within the script.
5 votes -
Allow tab history to stay open
I want to be able to keep my tab history open. I am rebuilding a lost development database and using search a LOT, but after I search, find a tab I want to look at more deeply or execute, the window disappears and my search predicate and place in the list of matching tabs is lost, so I have to enter search predicate and scroll back down each time. This is a VERY useful tool, but it would be so much more useful if I could just keep it open.
16 votes
- Don't see your idea?