274 results found
-
$ISODATE$ placeholder in snippets
The $DATE$ placeholder is great, but it inserts a date string according to my (or the server's?) locale.
I would very much prefer a placeholder that always inserts the current date according to ISO 8601 (e.g. '2015-07-22').1 voteHi Bruno,
In the latest version of Prompt you can pass in a .NET style format string (http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx) to the date placeholder eg. for the date you’ve given you could use ‘$DATE\(yyyy-MM-dd\)$’.
If you have any questions please let me know.
-
Command Line "Reformat All Files In Folder" and pre-Commit
Opening over 2500 code objects to set a baseline format, required by a large customer, is a daunting manual task.
Many of Red Gate's tools provide command-line functionality.
Please add it to Prompt so we can bulk (re)format SPs, UDFs, Triggers. Integration into the commit-path (we use SVN) would be ideal for standardized check-ins (Commits).
Can't recall whether a style is exportable... (License key awaited at new employer) Should be able to point to UNC location for the style to use.
109 votesBulk operations for formatting and code analysis were added as part of SQL Prompt 10.7
-
Generate Scripts Based on the Result Grid
Just like in Toad and SSMSBoost, there's a facility to create a script such as INSERT based from the given result grid. This would be handy in generating test data or re-populating tables
37 votesThis is included in SQL Prompt 7.1 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
try snippet
It would be nice to have a TRY CATCH snippet.
1 voteThis is included in SQL Prompt 7 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Aggregate Functions wrongly put in square brackets
I think I 've found a bug...
If you Format this SQLDECLARE @Translations TABLE ( [FundTypeId] INT NOT NULL , [ColumnName] NVARCHAR(128) NULL , [ColumnValue] NVARCHAR(256) NULL , [InsertedAt] DATETIME NULL , [InsertedBy] NVARCHAR(256) NULL , [LastUpdatedAt] DATETIME NULL , [LastUpdatedBy] NVARCHAR(256) NULL , PRIMARY KEY ( [FundTypeId] ) ); SELECT * FROM ( SELECT [pt].[FundTypeId] , [pt].[FundType] , [pt].[Comment] , [pt].[InsertedAt] , [pt].[InsertedBy] , [pt].[LastUpdatedAt] , [pt].[LastUpdatedBy] FROM @Translations AS [tmp] PIVOT ( MAX([ColumnValue]) FOR [tmp].[ColumnName] IN ( [FundType], [Comment] ) ) AS [pt] ) AS [tmp];
... it will break the code as the MAX function of…
1 voteWe’ve just released a new build of Prompt ( 6.5.0.332) which should have a fix for this. You can get the latest version from our website http://www.red-gate.com/products/sql-development/sql-prompt/
-
Add wildcards to tab coloring
Would be useful if tab coloring supported wildcards
eg *.sql = production
*.dev = development etc1 voteHi Nigel,
Wildcards are already supported for tab coloring in the latest version of Prompt. Just use a * for the wildcard in either the server or database column on the tab color options page. If you’re having any problems with this, please send me an email: aaron.law@red-gate.com
-
SYSDATETIME() instead of GETDATE() as default value for datetime2 columns
When generating an insert script with default values for a table, use SYSDATETIME() instead of GETDATE() for datetime2 columns. GETDATE(), is fine for datetime columns, but for datetime2 columns, which have a larger precision SYSDATETIME() would be more appropriate.
3 votesThis is included in SQL Prompt 7 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
semi colon placed on new line
Place semi-colon on new line.
I frequently format my statements as I'm developing them, but multiple times now I've started to add an Order By or some other clause after the auto-inserted semi-colon. I would like to see an option to place the semicolon on the line following the sql statement rather than directly after. This would enable me to start typing at the start of the next line without having to check if a semicolon had been added to the preceding line.
Example:
Select * From Table
Where A = 1; -- Semicolon added by formatting
Order By A9 votesThis feature is now included in the new SQL Prompt 8.0. For additional information see: http://documentation.red-gate.com/display/SP8/SQL+Prompt+8.0+release+notes
You can get the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for your help!
-
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/
-
Copy column from grid results as comma separated list
Oftentimes when I am writing queries, the results from one column of one query are quickly needed in my next one in an IN clause. I highlight the column of values from the results grid and paste into the query window, and then have to append commas (and for neatness, I delete the line breaks). I would be nice to have an added option the context-menu of the results grid to add a copy as comma separated list (in addition to the current copy and copy with headers options).
16 votesThis is included in SQL Prompt 7.1 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
IF statement format options
Please provide the option to format IF statements as follows, based on the format settings sample.
IF @productType IN ('a', 'b', 'd', 'g', 'i', 'O', 'Q', 'X', 'Z') BEGIN
----IF @cost <= @compareprice BEGIN
--------PRINT 'Less than $' + CAST(@compareprice AS varchar(20))
----END ELSE BEGIN
--------PRINT 'Exceeds $' + CAST(@compareprice AS varchar(20))
----END
END
3 votesWe’ve released a brand new formatting system in version 8 of SQL Prompt and have made further improvements since.
You can get the latest version of SQL Prompt from https://www.red-gate.com/products/sql-development/sql-prompt/.
If there is something missing please let us know by opening a new suggestion.
Kind regards,
The Prompt Team
-
Better SQLXML Support....
SQL XML is a great tool that gets very little support. When I am on an XML type variable...the intellisense isn't great....AT ALL. Doing something like:
declare @xml XML;
set @xml = '<Tests><Test><Id>1</Id></Test></Tests>';select @xml.value --This doesn't have intellisense. It will try to capitalize .value to .VALUE which isn't correct.
So better SQL XML support would be nice.
1 voteHi Mario,
In your example “value” will be suggested and left as lowercase in the latest version of Prompt 6. If you’re still having problems even on the latest version please contact support as you may have hit a bug.
Thanks,
Aaron. -
RECEIVE statement - Format SQL ignores
;
RECEIVE TOP(1)
@h = conversationhandle,
@t = messagetypename,
@b = messagebody
FROM SimpleQueueTargetFrom the Service Broker Workbench on Simple Talk.
It only moves the semicolon to a separate line. No errors. Ignores "comma at start".
And, yes, the @'s above probably start in column 1, when they're actually in col 5.
1 voteThis feature was released in version 8 of SQL Prompt.
If there are any missing features please let us know by creating a new suggestion.
Kind Regards,
The Prompt Team -
Add a menu option to decrypt stored procedures
It would be useful to add an option to decrypt encrypted stored procedures and display the decrypted SQL in a query tab.
We often work with encrypted SP's on customer databases, but when there is a bug report, it is often hard to see what is going wrong.1 voteHi Dirk,
This is already available in the latest SQL Prompt. It’s on by default but just to double check it’s enabled for you, there’s a checkbox at the bottom of the behavior page in the options named “Decrypt encrypted objects”.
Thanks,
Aaron. -
Add support for SQL CMD variables in SSDT/VisualStudio
When using SQL CMD variables in VisualStudio/SSDT project to support Database references using a Database variable(ex Different database, same server). SQL Prompt is no longer able to resolve objects.
SELECT a.* FROM [$(RefDataBase)].[dbo].[MyTable] a
Then a becomes an "unresolved alias"1 voteThis is included in SQL Prompt 6.5 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Surround list of values with quotation marks and separate by commas
when creating a WHERE colname IN ('a','b','c')
it would be nice if you could paste a set of rows from excel into SSMS and then add the quotation marks and commas
i.e.
A
B
Cbecomes
'A',
'B',
'C'7 votesSQL Prompt 7 now has an “Add quotes and commas” feature which can be accessed by selecting the block of text and tapping ctrl to bring up the Actions List. You can download the latest version from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Inserting the AS keyword for aliases
It would be nice if one could click a button and get the AS keyword between an object name and its alias. This would help with code that doesn't use AS to separate the two. And would also help readability.
Thanks.
4 votesThis feature was released in version 7.3 of SQL Prompt.
If there are any missing features please let us know by creating a new suggestion.
Kind Regards,
The Prompt Team -
Shortcut for Switching Styles
Can you add "choose style" or "switch style" to the commands section, as a drop down, so that it can be added to the SQL PROMPT toolbar? Or possibly as a hot key menu option?
I switch styles often. There's the style I like to work in, a style suited for debugging, and the style that management likes the code to be posted with (in TFS.) Being able to switch between them is very helpful. but, going to SQL Prompt --> Options --> Styles --> Selecting Style "with the mouse" is time consuming.
Thanks for your consideration!
Lawrence Barnes
10 votesWe’ve released support for quick switching of active styles in version 8 of SQL Prompt. You can right click in the editor window, select `Active Style` and then choose the style you want to switch to.
You can get the latest version of SQL Prompt from https://www.red-gate.com/products/sql-development/sql-prompt/.
If you are still keen to have this functionality available via a hotkey, please let us know by opening a new suggestion.
Kind regards,
The Prompt Team
-
"d" in "order by" should prompt with "desc", not "dbcc"
Currently if you type a query like this:
select *
from sys.objects o
order by o.name d[CURSOR]the popup consists of dbcc, deallocate, declare, delete, deny, desc, disable trigger, drop, dump.
While that is probably technically accurate, it would be much more helpful to make "desc" the first entry in the list, because it's what I'm typing 100% of the time.
1 voteThis is included in SQL Prompt 6.5 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Remove extra space between statements option is Needed
SELECT
*
FROM
Temp1--Remove this kind of extra spacing between statements option is Needed
SELECT
*
FROM
Temp2--Remove this kind of extra spacing between statements option is Needed
SELECT
*
FROM
Temp310 votesThis feature is now included in the new SQL Prompt 8.0. For additional information see: http://documentation.red-gate.com/display/SP8/SQL+Prompt+8.0+release+notes
You can get the latest version of SQL Prompt from http://www.red-gate.com/products/sql-development/sql-prompt/
Thank you for your help!
- Don't see your idea?