274 results found
-
Improve tab & parenthesis placement of subqueries ...wherever placed in query
Would like improve tab & parenthesis placement of subqueries ...wherever placed in query ...be it in JOIN, WHERE, HAVING ...or even in SELECT ...ALSO would like option for 1st tabbed item in SELECT list to be the starting position on each row for each subsequent item which includess the placement of the 'prefixed' comma ...see below...
BEFORE (Current formatting)...
LEFT OUTER JOIN (
SELECT
f1
, f2
, f3
FROM
dbo.t1
WHERE
f9 = 'x'
) AS e
ON e.f1 = b.f1
AND e.f2 = b.f2AFTER...
LEFT OUTER JOIN
(
SELECT
f1
, f2
, f3
FROM
dbo.t1
WHERE…17 votesThis feature was released in version 8.1 of SQL Prompt as part of our rework of parentheses formatting.
If there are any missing features please let us know by creating a new suggestion.
Kind Regards,
The Prompt Team -
semicolon: space before/after options
Request space options for semicolons that are analogous to space options for commas (see SQL Prompt-->Options-->Format-->Commas & parentheses)
p.s. -I really don't like the current auto-insertion of a space in front of the semicolons. At the very least, the semicolon formatting should remain untouched upon running Format SQL.17 votesAs of SQL Prompt 5.2.8, spaces are no longer inserted before semicolons during a Format SQL operation. We have not added a new option, as we have found no-one who likes the spaces to be there. If we receive further feedback to the contrary then we will consider adding an option in the future.
-
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/
-
Add 'N' to unicode type literal strings
Hi,
Is it possible to format below code
DECLARE @a VARCHAR(200);
SELECT @a = 'asdf';
DECLARE @b NVARCHAR(200);
SELECT @b = 'asdf';to
DECLARE @a VARCHAR(200);
SELECT @a = 'asdf';
DECLARE @b NVARCHAR(200);
SELECT @b = N'asdf';Thanks.
16 votesHello,
We have added this feature in SQL Prompt 9.1.4.4532
It can be found under Prompt → Options → StyleIt currently only works with variable assignments for variables declared in the same script.
If you would like to see us expand this more please let us know by creating a new idea.
Kind Regards,
The Prompt Team -
Qualify column names with table aliases only
I would like an additional option for the Inserted code > Qualification tab:
Qualify column names with table aliases only.
Most times I want to assign a table alias and use it when adding columns, however if I forget to assign a table alias or remove it, I don't want a fully qualified table name when using the Qualify column names with table name option.
I would like the option to qualify with both table names and table aliases or just table aliases and NOT table names.
16 votesThis is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Moving commas from "end" to "start" is always buggy when comments exist
Moving commas from "end" to "start" or vice-versa is buggy when comments exist after each column or parameter. This is an issue regardless of the type of statement (SELECT, INSERT, UPDATE, CREATE TABLE/VIEW/FUNCTION/STORED PROCEDURE, etc).
Here is my original SP with commas at "end" followed by comments (hyphens are used for indentation due to HTML formating issues):
CREATE PROCEDURE dbo.MyProcedure
---- @Param1 int, --Param1 comments
---- @Param2 int, --Param2 comments
---- @Param3 int --Param3 comments
AS
BEGIN
---- SELECT Col1 , --Col1 comments
---- ---- Col2 , --Col2 comments
---- ---- Col3 --Col3 comments
---- FROM MyTable
---- RETURN
END…16 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!
-
Add OUTPUT parameters when executing a stored procedure
When inserting code to execute a stored procedure, SQL Prompt currently automatically generates input variables of the correct data type, e.g.:
EXECUTE ETL.spLoad_DimPerson
@LatestLoadDate = '2016-06-21 18:51:43', -- datetime2
@TargetRowsInserted = 0, -- int
@TargetRowsUpdated = 0, -- int
@TargetRowsDeleted = 0 -- intHowever, the syntax does not seem to recognize OUTPUT parameters. When I ask SSMS to generate a query for me by right-clicking and choosing 'Execute stored procedure...', it gives me the following:
DECLARE @return_value int,
@TargetRowsInserted int,
@TargetRowsUpdated int,
@TargetRowsDeleted intEXEC @returnvalue = [ETL].[spLoadDimPerson]
@LatestLoadDate = '2005-06-21 18:41:59',
@TargetRowsInserted = @TargetRowsInserted OUTPUT,
@TargetRowsUpdated…15 votesThank you for your suggestion.
We’ve reviewed this as part of our UserVoice triage.
Currently this feature is available in SQL Prompt.
The OUTPUT and EXECUTE statements are auto generated.We don’t support the SELECT statement as part of this feature.
Please feel free to raise a new feature request if this is something you would like.
Kind Regards,
Prompt Team -
Improve "read ahead" for variables
I find that in longer stored procedures, declared variables often don't show up as I start to type them. E.g. typing @ towards the beginning of the sp shows me a list of the variables, however if I'm further down in the proc, they ofter are not listed.
15 votesThis is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
SQL Prompt > Format SQL Update for SQL Server 2016
Any query where "AT TIME ZONE" is used (new feature in SS '16), the Format SQL throws and error.
"SQL Prompt was unable to complete this operation. Problem areas have been highlighted"
The highlighting start from "AT TIME ZONE..."
Thank you
14 votesWe now support “AT TIME ZONE” in the latest release of SQL Prompt. You can download the latest release here:
https://forum.red-gate.com/discussion/80988/latest-stable-build-of-sql-prompt-is-8-0-0-1241-11th-may#latestThanks for your support!
-
Code sniffing
Hows about Code sniffing? For checking code compliance with user defined standards. Like checking column names conform to a defined standard, warnings on bad practices etc. You know all those little annoying things like no clustered index, use of cursors instead of set based ops, use of Select * or of Insert into tableA values (a,b,c).
All driven by user defined rules? With larger dev teams the standards docs always left to the side. If it could work on input and in some sort of batch mode (on sql source control check in?) it would be nice.
I've been looking…
14 votesWe’re happy to announce that we introduced code analysis in SQL Prompt 9+. For additional information see: https://documentation.red-gate.com/sp9/analyzing-your-code
You can get the latest version of SQL Prompt from https://www.red-gate.com/products/sql-development/sql-prompt/.
If you have any ideas regarding improvements to Prompt’s code analysis, please feel free to open further UserVoice requests.
Thank you for your help!
Kind regards,
The Prompt Team
-
CTE Support
It would be nice if SQL Prompt could parse CTE expressions and provide prompts just like for regular tables
14 votesThis issue has been reported non-reproducable in recent versions of SQL Prompt.
-
Add brackets to all database objects
Similar to the existing Qualify Object Names and the other pending request to fix case of all object names, I would like to have an option to add brackets added to all database object names (columns, tables, schemas) where they are missing.
13 votesThis is included in SQL Prompt 6.5 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Option to place Table names on the same line as the keyword
Currently, no matter what settings are applied, table names are always placed on a new line, for example:
SELECT
ID,
ThingFROM
TableNameJOIN
OtherTableName
ON blah=mooWHERE
something <> something elseMy personal preference is for:
SELECT
ID,
ThingFROM TableName
JOIN OtherTableName
ON blah=mooWHERE something <> something else
Please can we have an option to achieve table names on the same line as their action (FROM / JOIN)
13 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!
-
Stop deleting parenthesis I type
If I edit a statement like SELECT COALESCE(x, y, z) and then add some parenthetical as in LTRIM(COALESCE(x, y, z)), the last parenthetical is deleted by SQL Prompt even though I typed it. Two options are to 1) correctly establish parenthesis or 2) stop deleting characters I type correctly
12 votesThis is included in SQL Prompt 6.5 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Line up type declarations
I would like an option to align the type declarations, for example when declaring the columns in a table variable I currently get:
DECLARE @MyExample TABLE
(
MyCol1 INT ,
MyOtherCol VARCHAR(10)
)Which I would quite like to see laid out as:
DECLARE @MyExample TABLE
(
MyCol1 INT ,
MyOtherCol VARCHAR(10)
)The same is true for all other places where I'm declaring, so the parameters for a procedure for example
12 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!
-
add semi colon to insertion keys
Could we have a check box to allow us to have the semi colon as one of the insertion keys (Main->Behaviour)?
It's not as common as the other keys there but when I'm about to finish a script I can't just hit the semi colon key.
12 votesWe’ve added semi colon to the list of insertion keys in 6.2 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
intellisense for SQL functions
In Visual Studio 2010, when I type in a function name and then the open paranthesis, I'm shown some intellisense that tells me what type of parameters I need to type in. For example, if I type (using VB.Net) "Dim da as Date=DateAdd(", it tells me the first paramter is "Interval as Microsoft.VisualBasic.Interval", and so forth. It would be nice if SQL Prompt did this for built-in (or even user created) functions, e.g. the DATEADD SQL function. I can never remember exactly the parameter sequence of that function, and it would be nice if SQL Prompt showed me like VS…
12 votesSQL Prompt already did this, but there was a bug with certain built-in functions, including DATEADD(), that prevented the tooltip from appearing. This is now fixed in SQL Prompt 5.2.
-
Uppercase keywords without changing layout
I used this all the time in SQL Refactor for code I wanted to make easier to read but didn't want to have layout changes.Can we have it back?
12 votesUppercase Keywords is now available in SQL Prompt 5.1.
-
Better work with temporary tables variables
The script below does not generate the correct sql syntax when adding a @table name into a subselect
DECLARE @temptable AS TABLE (recid INT)
DECLARE @mytable AS TABLE (contractid INT)
INSERT INTO @mytable
( contractid )
VALUES ( 1 -- contractid - int
)---> type @my -> then tab
--> the table is predefined with brackes wich is wrong for a @table
-> the below row is the resultSELECT * FROM @temptable WHERE recid IN (SELECT * FROM [@mytable])
11 votesThis case should be fixed in the latest release of Prompt (6.3). Let me know if you’re still having any problems with it.
-
Surround templates added to snippet manager.
So you could highlight a column and surround it with isnull() for example.
Or surround a sql query and surround it with begin and end.11 votesThis is included in SQL Prompt 7 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
- Don't see your idea?