275 results found
-
SQL History initial cursor location
When opening SQL History, it should default the cursor to the search input box instead of requiring an additional click to start a search. Since 90% of the time I'm going to input a search, it makes sense to put it there.
This has no downside as, currently, the cursor doesn't by default go to anything.
2 votesHi Adam,
Thanks for the feedback, really helpful.
James
-
SQL History keyboard shortcut
Just like Tab History has, SQL History should have a keyboard shortcut to open the window.
2 votesHi there,
Thanks so much for the message.You can also use CTRL+SHIFT+X to access SQL History.
I hope this helps! -
A Create/Declare Table statement with a Primary Key gives a false positive BP014 in Code Analysis
If you have a table declared like this:
Declare @Test table
(TheKey int Primary Key,
SomeData varchar(10) Not Null)I am told that for "TheKey" "[NOT] NULL option is not specified in CREATE/DECLARE TABLE statement" defined. But, a Primary Key can never be null, so it is NOT NULL by nature.
So, when performing Code Analysis and the parser sees "Primary Key", "Not Null" should be inferred also.
2 votesHi,
I’m pleased to announce this issue was fixed in version 9.4.10 of SQL Prompt. You can access the latest version from https://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for bringing it to our attention!
Kind Regards,
The Prompt Team -
Put single quote marks around highlighted text (including multiple lines)
Very often i have copied a list of items i want to query in an IN() statement from the database, for example:
abc
def
ghi
jkland I want to format it like this:
'abc'
'def'
'ghi'
'jkl'or better yet:
'abc'
, 'def'
, 'ghi'
, 'jkl'Being able to highlight, right click, and select an option do do this, would be incredibly helpful.
2 votes -
code analysis blocks object detail
SQL Prompt v9.0.2.3223 use of Code Analysis has stopped the tooltip for showing structural details.
ie: statement like SELECT a,b,c FROM dbo.TableRequiringLock WITH (ROWLOCK, XLOCK) WHERE ID = @key
will just show TABLE HINT used when hovering over table name as opposed to showing the structure.
2 votesHi,
I am pleased to inform you that your request has been taken into account. Please update to the latest version in order to use it!
Regards,
Fabiola -
2 votes
-
SQL Formatter error
When using OPENJSON with the WITH clause, the formatter does not recognize the WITH clause as valid SQL. This should format but throws an error:
DECLARE @JSONString NVARCHAR(MAX) SET @JSONString = N'{"Vendors":[{"VendorNumber":200,"VendorName":"Vendor1"},{"VendorNumber":201,"Vendo2"},{"VendorNumber":202,"VendorName":"Vendor3"}]}'
SELECT VendorNumber ,
VendorName
FROM OPENJSON(@JSONString, '$.Vendors')
WITH (VendorNumber INT '$.VendorNumber', VendorName VARCHAR(50) '$.VendorName')2 votesThis formatted error has been fixed in the latest version SQL Prompt 8:
https://forum.red-gate.com/discussion/80988/latest-stable-build-of-sql-prompt-is-8-0-0-1241-11th-may#latestThanks for your suggestion!
-
Enhancement to "Warning on delete and update statements if no WHERE clause is specified"
This is a great idea, but I was surprised by the number of "false positives" I am getting (and yes, I can just mute the messages completely).
In my case I am doing a lot of updates/deletes with joins to temporary tables or table variables and that limits the update/delete scope.
Can you add to this feature so that messages will not be emitted if there is a join to a temporary table or table variable?
2 votesThanks for your feedback on this feature! We’ve just released a new build of SQL Prompt (7.2.1) which won’t show these warnings when modifying temp tables with aliases.
-
Exclude a region from formatting
Sometimes, formatting makes a query less readable, e.g.
insert table (col1, col2, col3, ....)
values (1,2,3,...),
(11,12,13,...),
...Formatting will put the values on multiple lines if there are enough of them. It's easier to see the data when they are on one line. So how about:
--#region [optional description] #SQLPromptIgnore
--anything in here doesn't get formatted
--#endregion [optional description]Not sure what would be best for '#SQLPromptIgnore'
2 votesAs Joe Momberg said, this is now available in 7.3 – http://documentation.red-gate.com/display/SP7/SQL+Prompt+7.3+release+notes#SQLPrompt7.3releasenotes-Disableformattingforblocksofcode
You can download the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Highlight variables having the same name...
This feature would be great... http://stackoverflow.com/questions/21899826/sql-server-management-studio-highlight-variables
2 votesWe’ve added the “Highlight matching objects” experimental feature in SQL Prompt 7.1 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Exclude Identity Field From Auto Generated Insert/Values Code For Table Variables
If a table variable or temp table has an identity field, I do not think this field should show up in the auto generated insert into/values list:
DECLARE @Table TABLE (TableId INT IDENTITY(1,1), Data VARCHAR(100);
INSERT INTO @Table
( [TableId] -- This field show not show up by default in the insert list
, [Data] )
VALUES ( 0 -- TableId - int -> This field show not show up by default in the insert values list
, '' -- Data - varchar(100)
)-- Temp Table
CREATE TABLE #Temp (TableId INT IDENTITY(1,1), Data1);INSERT INTO [#Temp] ([TableId],
[Data1]) VALUES…2 votesThis is included in SQL Prompt 7.1 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Let cursor jump to capitalized letters within words (CTRL+arrow)
Hi there. Would it be possible to program a feature that is
present in Visual Studio (I think ReSharper brings it
into VS) which enables a programmer to select/move among
parts of a word based on where the capital letters are? (CTRL+arrow)
Say you have a variable called @ThisIsMyVariable.
If you place the cursor at the end of the word and then
press CTRL+<Left Arrow>, then it’d be nice if the cursor
jumped to the beginnig of the next capital letter instead
of the next word as is usual. This feature is very helpful in VS and I think it’d…2 votesThe latest version of Prompt has an experimental feature for “Change keyboard shortcut behavior for CamelCase words”
-
Tab History (aka SQL Tab Magic) should not show currently open windows
I love Tab Magic (or Tab History), but the with the latest version it also shows the tabs that are currently open. I would like an option to ignore currently open tabs. I can search those tabs right in SSMS, I need Tab History just for ones I've already closed.
2 votesWe’ve added a “closed tabs” option in SQL Prompt 7.1 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
qualify column names with table: temporary tables
The qualify column names should work with temporary tables as well.
2 votesThis is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Autogen insert and commas at the beginning of the statement
I find having the commas at the beginning of the line extremely useful - and was glad that Sql Prompt allows us to set the default as such for insert statements. I have to say the format is quite difficult to read, and find that I have to rewrite it each time. Can you please spend a few minutes to clean it up? I see there are a couple outstanding requests that have been ignored for 2 years now - no input from redgate at all. I'm sure there are others who would agree with this - (just check out…
2 votesThis is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Snippet Manager - Placeholder For New GUID
It would be nice to have a placeholder that, when the snippet was used, was replaced with a new GUID. For example:
INSERT audit.Changes (Id, Date, Reason)
VALUES ('$GUID$', '$DATE$', '$CURSOR$')2 votesThis is included in SQL Prompt 7 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
snippet isn't working correctly
When using snippet with version before 6 (5ish), I could just hit tab and it will give me the correct code. However, with version 6, sometimes (half of the time), the first choice is nothing. It will do nothing rather than giving me the code for that particular snippet. Please fix it. It's very frustrating.
2 votesHi Jay, I think this was fixed a while back but if you’re still encountering any issues with it let us know.
-
What happened to the options settings for Tab Magic? I rarely, if ever, want the last tab opened and would like to be able to stop it
What happened to the options settings for Tab Magic? I rarely, if ever, want the last tab opened and would like to be able to stop it from doing so every time I start an instance of SSMS
2 votesWe’ve released SQL Prompt 6 which includes the tab magic options.
-
smart rename local
We would like to (smart) rename local variables in stored procedures.
2 votesThis is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
One line SQL from context menu - Opposite if Format SQL
Have a function which is the opposite to 'Format SQL' so you can select a section of text and have all the Line Breaks and padding taken out. Currently I use HTML Shrinker Pro to do this, but it would be nice to select a block and one line it eg..
@DateAppointed = CASE WHEN LEN(DateAppointed)> 1 THEN DateAppointed ELSE @Unknown END ,2 votesSQL Prompt 7 has an “Unformat” action in the new Actions list. The full release notes can be found here http://documentation.red-gate.com/display/SP7/SQL+Prompt+7.0+release+notes
- Don't see your idea?