184 results found
-
Format CTE closing parenthesis
It would be nice to have an option under Formatting Style -> CTE to allow closing parenthesis behavior, just like the opening parenthesis one:
- Place closing parenthesis on new line
- Closing parenthesis alignment13 votes -
warn against data truncation
I would be nice if SQL-prompt could warn against posible data truncation.
Like assigning a int value to a tinyint field/variable or assigning a varchar(30) to a varchar(3).
I want it both at an global analysis (like find invalid objects) and in the current scrip edit (while modifying a trigger / procedure / function).13 votes -
THEN expression on same line as keyword
Current formatting is:
CASE
WHEN 1 = 1 THEN
'Hello World'
ENDI need the option to put the expression on the same line:
CASE
WHEN 1 = 1 THEN 'Hello World'
END12 votes -
Automatically add DROP TABLE IF EXISTS for #temp tables
It would be nice if SQL Prompt had a way to add in the code DROP TABLE IF EXISTS #table for temp tables. Ideally it would add the statement immediately before the table is created from a CREATE TABLE or SELECT INTO statement.
11 votes -
Top with parenthesis should be a formatting option
Changing
SELECT TOP 10...
to
SELECT TOP (10)... should be a formatting option.
11 votes -
LINQ Style SQL
What I’m proposing, would change the way we type our SQL scripts. I’m not suggesting we try to pass or force through a new SQL standard. I’m simply suggesting a new dynamic “view” of the SQL syntax, which would allow for a more natural support of intellisense. With today’s IDE’s this simply doesn’t work. Intellisense doesn’t know where to pull the “what” from. The “what” comes from the “where”, (the FROM clause).
The underlying SQL script itself, would still comply with the SQL standards. This “view”, would perform three tasks: 1) allow the end-user to type their SQL more like…
11 votes -
Formatting of the invocation of a stored procedure
Hi there. Currently, SQL Prompt formats an invocation of a sproc like this:
exec sproc @param1 = ?,
@param2 = ?,
@param3 = ?I'd like to be able to change this into:
exec sproc
@param1 = ?,
@param2 = ?,
@param3 = ?Thanks.
10 votes -
Multiple format options for insert statements
Currently SQL Prompt only has one option for formatting insert statements which poses a problem for us with multi value set inserts.
Ideally we'd be able to select a formatting for a single value set insert and another format for a multi value set insert.
This would allow us to do something like this:
-- Single Value Set Insert
INSERT INTO TestTable (TestName,
~~~~TestValue,
~~~~TestDate)
VALUES (N'Something',
~~~~140,
~~~~'1/1/2019')-- Multi Value Set Insert
INSERT INTO TestTable (TestName, TestValue, TestDate)
VALUES (N'Something', 140, '1/1/1900'),
~~~~(N'SomethingElse', 150, '1/2/1900'),
~~~~(N'SomethingElse2', 160, '1/2/2000')The issue for us is that we have need of…
10 votes -
Ability to format SQL text externally
It would be nice to have ability to format the documents automatically, have an API or command line command for that. For example to force format when check-in code.
10 votes -
semi colon placed on new line if statement is on more than one line
Add option to leave semicolon on same line if statement only use one line.
My idea is an additional to the idea captured in the "semi colon placed on new line" request.
It would be nice to have checkbox for the semicolon-on-new-line option to not move the semicolon to a new line if the statement is ONLY one line.
For example:
SELECT TOP 10 * FROM dbo.Table
;
should be
SELECT TOP 10 * FROM dbo.Table;
instead, but
SELECT TOP 10 *
FROM dbo.Table
;
will remain unchanged by formatting.10 votes -
Merge Command Formatting
Merge Command Formatting
For MERGE commands there is no way to make the conditional requirements with 'ON' follow the same style as JOIN's ON. I noticed back on 5/17/2017 there was a closed 'Merge command formatting options' through the User Voice, stating that an experimental feature was available for SQL Prompt 7.4. What happened? In my 10.1.7.15015, within the formatting styles, there is no area for MERGE like there is for JOIN.
9 votes -
Add "insert missing aliases" during formatting if desired
When typing SQL aliases are inserted automatically if configured. However when opening existing query from some other source it would be nice to execute an options to add missed aliases based on the same configured rules as with editing.
9 votes -
Add Support for Microsoft Analytics Platform System
If a sql command is written with an APS specific statement (for example: "CREATE TABLE AS, or "OPTION (Label = 'Query Description')" ), then a script parsing error appears.
9 votes -
Add option to indent code between BEGIN TRANSACTION and COMMIT TRANSACTION
Someone else has submitted this suggestion and it is marked completed. However, it does not seem to do so in my version of SQL Prompt (9.2.6.6145)
9 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 -
Auto generated INSERT needs a column blacklist
Add the ability to exclude columns from appearing in the auto-generated INSERT statements. I have to manually remove certain columns every time.
9 votes -
Auto-Correct TOP to include Parenthesis
Add an Enable checkbox in the Style Sheet | Global | Parenthesis settings.
When SQL Prompt encounters the 'old style' usage of TOP, without parenthesis, automatically enclose the apparent 'what' in parenthesis.
8 votes -
Allow block comments /* SQL Prompt formatting off */ to disable T-SQL formatting
SQL Prompt should allow block comments /* SQL Prompt formatting off */ to disable T-SQL formatting.
Single line comments are a pain when tuning queries. I would always use block comments in my code except when I don't want SQL Prompt to not mess with certain T-SQL it does not format to my standards.
Blocking formatting should support both type of comments.
/* SQL Prompt formatting off */
-- SQL Prompt formatting off8 votes -
Option to not square bracket aliases
It would be nice to have an option to not but square brackets around aliases as it's our style to not do so. We find it makes the aliases unnecessarily long,since most of our aliases are 1 or 2 letters.
For example
SELECT
T.[TableId],
T.[Name]
FROM
[dbo].[MyTable] Tvs
SELECT
[T].[TableId],
[T].[Name]
FROM
[dbo].[MyTable] [T]Currently we have to go back and rename an alias to itself so that the square brackets go away.
8 votes -
column alias by column name
Feature to automatically add column alias with the name of the column.
E.g.:SELECT Column1
FROM Table1 AS t1changes to:
SELECT Column1 AS Column1
FROM Table1 AS t1If the name can not be found add a dummy-alias like Exp1
8 votes
- Don't see your idea?