663 results found
-
Indent FROM clause
Allow the FROM, WHERE, GROUP BY, etc. clauses to indent from the select.
Change
SELECT Col1,
Col2
FROM Tab1
WHERE a = bTo
SELECT Col1, Col2 FROM Tab1 WHERE a = b
3 votes -
export to excel bug(?) -- Acts odd if multiple result sets
Before I upgraded to latest version of SQL Prompt, if I had two queries in the same "New Query" window and ran them, I could select either of the two result sets and choose "Open in Excel" to open up the selected result set in Excel. Now it always seems to auto-select the first result set.
What I'm usually doing here is two related queries. I pick the larger result set, open that in Excel, and then add a new tab to Excel and copy-and-paste the smaller result set to the 2nd tab. Or sometimes I'm doing multiple queries to…
3 votes -
Generate C#/VB.NET class
It would be nice to have the ability to right-click on a table or stored procedure and generate a C# or VB.NET class from the table structure or stored procedure results that could be used in a development solution.
3 votes -
Have formatting features for cross join match those of left/right/inner join
I have set up rules to format as such:
Select *
From Employees e Join
People p On e.PersonID = p.PersonID;Each table/view object aligned on a new line. However, when I convert to a "cross join", they don't generate a new line, they concatenate on the same line, like such:
Select *
From Employees e Cross Join People p;3 votes -
Additional options for formatting the ON constraints of a JOIN
It would be appreciated if you could enhance the SqlPrompt Formatting Styles functionality for the Clauses >>> JOIN section. I'd like the ON keyword to stay on the same line as the table-name, but when constraints are line-wrapped, I'd just like them to be "normally" indented.
Presently, the only way to get close to this behavior is to check the "Place ON keyword on new line" checkbox and set "ON keyword alignment" to "Indented". But I don't want that box checked.
3 votes -
Table Column Format Correction
In cases where there is SELECT DISTINCT or SELECT TOP(n) .. I would l like the option to format my table's columns to appear on the next line and indented 1 tab or set of spaces in from the SELECT and not necessarily aligned with DISTINCT or TOP in the line above.
SELECT DISTINCT
COLUMN1,
COLUMN2
FROM ...instead of
SELECT DISTINCT
Column1,
Column2
FROM ...3 votes -
Ability to choose schema when there are multiple objects with the same name exists
Currently when SQL code is formatted, it will pick the first schema, if there are multiple objects with same name but having different schemas. It would be good if the choice is given to the user to choose which schema.objectname to use in this case.
Also it's better if we can exclude certain schema's to be considered during code format. (But want to see the intellisense. Only to exclude them during the code format)
3 votes -
Find invalid objects in script
Highlighting invalid objects is a nice feature, but it would also be nice to "find" invalid objects in a script.
Running SQL Format on a script with an invalid object in it runs fine and gives no error, it just doesn't prefix the object (like a table) with the schema.
It would be nice to have a quick and easy way to "go to next invalid object" or even for when you run SQL Format to have it bring up a warning saying "this/these object/s appear to be invalid".3 votes -
"Insert Semicolons" feature should add Semicolon after "BEGIN"
When using a BEGIN/END block, the "Insert Semicolons" feature adds a semicolon after "END" command, but not after the "BEGIN" command.
One reason why this should be done, is the use of the THROW statement, which requires the previous statement to be terminated with a semicolon.
Technically it is still runnable code, but, SSMS (as of version 18.8) sees it as a syntax error (see screenshot).
I don't know which is the appropriate fix...waiting for SSMS to fix the syntax error it shows (but I doubt they will since the non-use of semicolons is deprecated), or if it's appropriate for…
3 votes -
Do not auto complete literal strings
Currently SQL Prompt displays suggestions for auto-completing literal strings. These are never valid suggestions so can this be turned off (or at least have an option to turn this off)?
3 votes -
Custom Aliases - Ability to Create a List to Import
Custom Aliases - Ability to create the list and import without having to use the SQL Prompt - Options-New... Interface. Reasons: Speed and to alphabetize.
3 votes -
Add support for LEAST and GREATEST
Please add support for the new SQL functions LEAST and GREATEST. Currently only available on Azure DB.
Information (can't find official Microsoft documentation): https://www.linkedin.com/feed/update/urn:li:activity:6737816854498291712/3 votes -
Copy results as Markdown Table
When right-clicking in the results tab, SQL Prompt should offer the posibility to copy the results as a table with markdown formatting (for Stack Overflow / Stack Exchange network). See https://meta.stackexchange.com/questions/356997/feature-preview-table-support for the syntax.
3 votes -
Option / Action to remove square brackets from types
I prefer types without square brackets ( INT vs [INT], for example).
If using square brackets for identifiers in the format options, there is no quick way to remove these.
My work-around is -
1. Apply Format Style option "Add/remove brackets + Remove Unnecessary brackets"
2. Format the block of code
3. Apply format Style option "Add/remove brackets + Add brackets to all identifiers"
4. Format the block of code
5. restore format Style option to original choiceIt would be nice to have a single action to do this, or to have a separate option in format styles to…
3 votes -
Suggest casting to match data types in joins
In a large query, it can be a hassle to check every join to make sure the data types match up exactly (for example, nvarchar(50) <-> varchar(100)). These differences can have huge impacts on query performance in some circumstances, or lead to confusing results if data types are converted in an unexpected way. A suggestion to call out boolean statements comparing mismatched data types could be extremely useful.
3 votes -
Add possibility to make snippet for "GROUP BY 'by all non-aggregated columns'"
I use GROUP BY only for 'by all non-aggregated columns' in 99% of cases. I've created snippet for GROUP BY (gb) and then I pick this option from the intellisense menu. It would be nice to have possibility to have snippet that would add these 'all non-aggregated columns' automatically most probably by adding new variable.
3 votes -
Custom Formatting and Refactoring (API)
I would like to expand upon suggestions others have made regarding adding custom formatting and analyzers.
I have recently been trying to implement SQL Prompt for our team, and I have struggles with a lack of customization, opinionated options that don’t reflect our needs, and some bugs.
What would have solved this issue for me would have been the ability to add custom formatters and custom analyzers.Custom Formatters
Since SQL Prompt gets the position of tokens from IAlignmentProvider.FinalAlignmentForToken I suggest that the API couple simply be plumbed into this method, if a plugin is attached it would call the…3 votes -
SQL Prompt Setting Sharing
Provide an easier way to share SQLPrompt (snippet/code formatting/settings).
Like give us 2 (or more) folders to connect to, rather than one, 1 for the default items (make them read only, but optional?) Then directories for items you write for personal use, then one or more for team shares.
I share common ones with team, but they don't need my changes, or some I use for personal uses (like formatting code for a book, or snippets for features we don't use)
Right now, I have started using naming conventions to copy out team items to put into Source Control to…
3 votes -
Tab History, wrong server
After doing multiple server migrations, if you open something in tab history that was for one of the previous servers. Sometimes an implicit connection to the server is still used despite not being connected to that server in Object Explorer. This has caused us to have to troubleshoot something that wasn't working anymore when it fact it is just because the connection was the old server. This forces us to copy the SQL statements to Notepad then open a new window and past so that the connection is set to the connected to server. Some kind of warning of this…
3 votes -
SQL Prompt does not think PERSIST_SAMPLE_PERCENT is valid
PERSIST_SAMPLE_PERCENT is a new feature in SQL Server 2016 SP1 CU4.
SQL Prompt does not think this is a valid UPDATE STATISTICS statement:
UPDATE STATISTICS dbo.MyTable(MyStat)
WITH FULLSCAN, PERSIST_SAMPLE_PERCENT = ON;It is valid and the correct syntax. SQL Prompt should be updated to format this correctly.
3 votes
- Don't see your idea?