662 results found
-
script insert as
Today’s mail from https://sqlquantumleap.com/2019/05/09/maximum-number-of-rows-for-the-table-value-constructor/
Shows as way around the 1000 rows limitation on the VALUES ()… statement.Please enhance SQL Prompts “Script as Insert” feature to use this method.
Currently SQL Prompt is scripting it like this, when the results window has more than 1000 rows:
CREATE TABLE #temptable( [id_user] int, [RowCnt] int, [mt] datetime)
INSERT INTO #temptable
VALUES
( 372, 2,N'2012-09-01T00:00:00')
INSERT INTO #temptable
VALUES
( 196, 2,N'2012-09-01T00:00:00')
INSERT INTO #temptable
VALUES
( 210, 2,N'2012-09-01T00:00:00')
…It can be done like this:
CREATE TABLE #temptable( [iduser] int, [RowCnt] int, [mt] datetime)
INSERT INTO #temptable
select *
from(
values…5 votes -
"drop user"
Highlight of today was when I ran
DROP USER MyUser
In the wrong (production) database.
Please add a warning to SQL Prompt, like your
"You're about to execute a DELETE statement without a WHERE clause"When you run a DROP USER or a DROP LOGIN statement on a production server. Not only does the user or login disappear, but also all rights granted to the user.
Maybe add the question “are you in the correct database?”
3 votes -
SQL Prompt Issue EI030 shows fals positive on views including TOP (n)
If a View looks like
SELECT TOP(n) FROM x ORDER BY x.clumn
SQL Prompt shows issue EI030 although the ORDER BY is vital for the TOP (n) clause3 votes -
format Window functions
SQL Prompt fails badly in formatting window functions. As these are present at least since SQL 2014, SQL Prompt should be able to interpret them and format them accordingly.
Example:
I would format the LAG() function as follows:
SELECT
myColumn AS realColumn
,LAG(myColumn, 1, 0)
OVER (
PARTITION BY someColumn
ORDER BY anotherColumn) AS calculatedColumnTry this with SQL Prompt - it's result is not very nice...
5 votes -
format expressions like operator
Would it be possible to treat the 'LIKE' operator the same as '=' in the Expressions\Operators settings so they are all aligned?
select AddressID
from Person.Address
where ModifiedDate
between dateadd(month, -6, getdate())
and getdate()
and City = 'Bothell'
or left(PostalCode, 2) like 'CB%'
or PostalCode = @prefix + @suffix2 votes -
Open a pre-configured list of servers in Object Explorer when SSMS starts
In the setting of SQL Prompt there should be an option to create a list of servers.
When SSMS then starts It should automatically create a connection to this list of servers in Object Explorer.
It would be a great feature, when working with the same servers, it takes a long time to connect to servers everyday when work starts :-)
5 votes -
Make equals signs line up with tabs
When I type code I like to line up all the equals (=) signs using tabs so that all the code to the right of the equals sign lines up nicely on my screen. I find this really useful for improving readability when using column aliases, in joins, and in update statements.
I can't find an option in SQL Prompt to do this and it annoys me when I format my SQL and all the equals signs become ragged.2 votes -
Expand Wildcards with alias and equal sign
When I expand Wildcards I would like it like
Select col1 = tb.col1
col2 = tb.col2
FROM tb4 votes -
Lists formatting for Columns and Parameters should be treated separately
The starting item in a List of Columns for a SELECT statement is fine to place on the same line as the SELECT, however, for EXEC <proc name that is probably longer> it looks odd to have the Parameters line up at the end. This should be a separate choice for EXEC Parameters. I chose the "commas before" style for most everything, but prefer the "default" layout for EXEC proc parameters.
4 votes -
Refactoring INSERT into MERGE
Refactoring INSERT into UPDATE is definitely useful, but most of us are familiar with these. The complex MERGE statement is a mess, and a clean way to generate that would be fantastic!! Especially since you can figure out the primary keys, etc..
4 votes -
Autofix for existing functionality
There are cases where the code analysis detects errors and where the tool already have functionality to correct the issue. For instance with unqualified column names
2 votes -
Allow me to specify relationships
I'd like to be able to give hints about how to join two tables. For example, column A in table 1 is the key for column B in table 2. It's not always possible to make that a real reference column so it would be nice if SQL Prompt knew that it should present it as an option when doing a JOIN clause.
2 votes -
Formatting arithmetic - new lines (Apex has this)
The only edge Apex has over SQL Prompt formatting, at least for my use, is being able to organize long equations. If I am using a large number of columns for an equation, I'd like to place each new column on a new line.
1 vote -
Replace synonym with target object
I would really like the option to select the occurrence of a synonym in DML statement and have SQL Prompt replace it with the synonym's target object.
2 votes -
Misc. UI Improvements
Themes, Dark mode mainly. Ability to add company logo when you log in via browser, like we can in reports.
3 votes -
Create a table variable from a table
Very often I need to create a temp table, table variable, or UDTT that is a duplicate or subset of an existing table. I'd like the @table definition to include primary key and unique constraints and any check constraints and default constraints that are in the actual table. No foreign key constraints obviously. SSMS object scripting botches this up by creating a bunch of alter statements instead of including constraints inside the CREATE statement.
7 votes -
Running "Find Invalid Objects" will crash SSMS if stored procedure is encrypted
If any stored procedures in the database are encrypted then "Find Invalid Objects" will get a null reference and prompt to restart SSMS.
3 votes -
code folding
Enabled Intellisense conflicts with SQL Prompt and needs to be disabled. This also disables Code Folding feature (Outline Statements) of SSMS, which is very useful for large coding projects.
It would be helpful if SQL Prompt were to offer the similar feature.8 votes -
Ability to search contents of object within contents pop-up
When hovering over an object like a Proc or a View, and you click the link in the pop-up to view the contents of that object. It would be nice if there was a simple search function. Many times when I'm viewing the contents of an object, it's just because I want to see where it's making a particular reference, so I have to copy, open a new tab and then search.
1 vote -
Mark same columns in JOIN conditions
It helps avoiding join on the same column (especially at inner join).
Example:
UPDATE A SET Column1 = B.Column2 FROM TableA AS A INNER JOIN Table B ON A.Column3 = A.Column3.
It happens usually by accident. The statement should be:
UPDATE A SET Column1 = B.Column2 FROM TableA AS A INNER JOIN Table B ON A.Column3 = B.Column3.14 votes
- Don't see your idea?