663 results found
-
IF Statement block formatting is messed up
IF Statement block formatting is messed up
IF 1 = 1
BEGIN
PRINT 'DO STUFF'
ENDbecomes
IF 1 = 1 BEGIN
PRINT 'DO STUFF';
END;which is what I want...I want to leave the BEGIN END indention
5 votes -
Tab History
Tab history grows considerable with tabs that you don't care about. How about a hot key combination so that when the tab is closed it does not add it to history. Example: While holding the ctrl key down I close a tab and this prevents it from being added to history.
6 votes -
SQL AUTO-SYNTAX
when you insert a ssf (Select * from) you select the table and correct automatically errors like WEHRE, WERE, WEHER where the user wants to say a WHERE a logical word dictionary in which, it could be done by matching characters if all the characters written are 100% or 90% matches with word WHERE whenever is the order of the characters then autochange the text for where, This also can be matched with other KEYWORDS of SQL
2 votes -
formatting of OVER clause
Would like to control formatting of the OVER clause. E.g I would like the complete "(Partition by ... order by ...) as xyz" on one line, but today it's overrdden by other options.
29 votes -
SQL Prompt -> Tab History -> add datetime stamp column
Currently it shows the filename and servername, but it would really help to have the datetime of when it was executed. Sorting the columns would be an added benefit as well.
4 votes -
DECIMAL default scale warning in Code Analysis
Would be great if SQL Prompt Code Analysis would give a warning on SQL Below:
SELECT CAST( 1.453 AS DECIMAL)
SELECT CONVERT(DECIMAL, 1.453 )3 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 -
Automatically create variables for use with generating full INSERT statements
Currently the behavior for inserting a full INSERT statement is that it produces something like this:
INSERT INTO dbo.ContactPictures
( InterActionPersonalContactID ,
InterActionFirmContactID ,
ImageFileStoreFilePathSegment ,
Source ,
ManuallyCreatedByUserAccountName ,
DateTimeLastUpdated
)
VALUES ( 0 , -- InterActionPersonalContactID - int
0 , -- InterActionFirmContactID - int
'' , -- ImageFileStoreFilePathSegment - varchar(256)
'' , -- Source - varchar(20)
N'' , -- ManuallyCreatedByUserAccountName - nvarchar(40)
GETDATE() -- DateTimeLastUpdated - datetime
)Hard-coded values are rarely what's needed, though; it would be very useful if it could generate variables and use them in the statement, like this:
DECLARE @InterActionPersonalContactID INT = 0…
8 votes -
EXEC sp without return (EXEC @Results = sp)
EXEC spwho2 without return (EXEC @Results = spwho2)
Give a warning when tsql or stored procedure has execute a stored procedure without a variable for an error to bubble up to.This is the proper way because ieven in a try catch the Exec sp_who2 won't give and error to stop the tsql from going on
3 votes -
Have the update process default to only updating installed tools
I don't use SQL Prompt in Visual Studio and likely never will. However, every time I update, the updater defaults to installing it for VS and updating SSMS. It would be nice if the update process defaulted to only doing updates.
7 votes -
Add rule for deprecated DATABASEPROPERTY
Add rule for deprecated DATABASEPROPERTY
3 votes -
Conditionally place ON keyword on new line if exceeds specified wrap margin
My default preference is to maintain the ON keyword without a new line. I would like to be able to CONDITIONALLY place the ON keyword on a new line if, and only if the ON keyword together with the associated ON condition exceed a configurable wrap threshold.
Example:
-- Yield this >>>>
SELECT *
FROM Person.Address
INNER JOIN Person.StateProvince
ON StateProvince.StateProvinceID=Address.StateProvinceID
-- >>>> instead ofSELECT *
FROM Person.Address
INNER JOIN Person.StateProvince ON StateProvince.StateProvinceID=Address.StateProvinceID
-- Assuming the JOIN clause exceeds the wrap length
-- <<<This is particularly useful if the "Place JOIN table on new line" is NOT selected…
3 votes -
Ending Subquery parenthesis aligned to opening parenthesis - option please
Similar to the CTE request https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/19545028-format-cte-closing-parenthesis
Aligning the closing parenthesis on its own line, in the same column as the opening paren, makes the subquery stand out, as well as making the alias stand out.
9 votes -
Indent statement after IF when not enclosed by BEGIN/END block
if blah=1
____return 1;if blah=2
_begin
_return 2;
_end
else
_return 0;13 votes -
Arithmetic expressions - format consistently with logical expressions
Arithmetical expressions and compound logical expressions all consist of operations and expressions with parentheses and orders of precedence. All of these should have the options for aligning operands, aligning parentheses, adding parentheses to make the default orders of precedence explicit. All expressions are subordinate to clauses so they should be indented under WHERE, ON, SELECT, WHEN.
1 vote -
IN clause - indent according to parenthesis rules according to the expression they are in
It would be nice if the IN clause were formatted like a logical function that returns a value so that it followed the options and rules for parentheses and were indented according to its place in the logical expression. (paying attention to the ANDs and ORs if present)
2 votes -
Offline TSQL code analysis and Standardization report..Where we can add custom rules regarding to company naming procedure
My Name is Waleed Abrar and my license number is. I am actively looking of Static TSQL Analysis and I was really happy with the SQL Prompt. I have done some analysis and implemented some test cases. It works really good working live and parallel to development . I want to ask if it’s possible to do an offline analysis and get a HTML or Excel report for a particular database about the TSQL code Quality inside the DB. For Example I can select the Database ‘XYZ’ and then click Analyze static code. It will give me a report back…
2 votes -
Inconsistently Advised to Use Alias For CTE (ST010)
Simple statements do not flag this:
WITH CTE1 AS (SELECT TestColumn FROM dbo.TestTable)
SELECT a.TestColumn FROM CTE1 a
INNER JOIN CTE1 b ON a.TestColumn = b.TestColumn;However, more complex statements do:
WITH CTE1 AS (SELECT TestColumn FROM dbo.TestTable),
CTE2 AS (SELECT TestColumn FROM CTE1),
CTE3 AS (SELECT TestColumn FROM CTE2)
SELECT CTE3.TestColumn FROM CTE3
INNER JOIN CTE2 ON CTE3.TestColumn = CTE2.TestColumn;In the final select clause, both CTE2 and CTE3 are flagged with 'Use alias for all table sources' (ST010).
Seems a bit OTT to suggest references to CTEs are aliased? I accept that a CTE defines, in relational terms,…
4 votes -
Code Analysis EI028 Incorrectly Identified When Adding Not Null Column With Explicitly Defined Default Value
Stop raising EI028 when adding columns using style:
ALTER TABLE dbo.MyTable
ADD TestColumnB CHAR(1) NOT NULL,
CONSTRAINT DFMyTableTestColumnB DEFAULT ('B')
FOR TestColumnB;2 votes -
EI003 to allow variable assignment of MIN and MAX and Scalar-valued function results
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 MIN or MAX query which would only result in a single value. Also get the warning when i create a Scalar valued function and assign variable to result of a call to that. In each of these 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
2 votes
- Don't see your idea?