6 results found
-
Don't alias objects with reserved words
CREATE TABLE dbo.GrumpyOld (col1 int)
SQL Prompt will alias the table as GO, which causes problems because it's a batch separator.
Thanks!
1 voteThis feature was released in version 7.3 of SQL Prompt.
If there are any missing features please let us know by creating a new suggestion.
Kind Regards,
The Prompt Team -
decimal
Hi, It would be great, if you add precision and scale on numeric/decimal data types - column hint and table summary.
3 votesThis feature was released in version 7.3 of SQL Prompt.
If there are any missing features please let us know by creating a new suggestion.
Kind Regards,
The Prompt Team -
VALUES
Correctly qualify the Table Value Constructor.
I frequently use a TVC to find the Max value among several values on a single row, as with the following:
;WITH MyCte AS (SELECT 1 AS a, 2 AS b, 3 AS c)
SELECT
MyCte.a,
MyCte.b,
MyCte.c,
HighestNumber = (SELECT MAX(Value.Val) FROM (VALUES (MyCte.a), (MyCte.b), (MyCte.c)) AS Value(Val))
FROM MyCteWhen I qualify object names within that script, it incorrectly tries to add the 'Value' as a qualifier within the constructor:
…;WITH MyCte AS (SELECT 1 AS a, 2 AS b, 3 AS c) SELECT MyCte.a, MyCte.b, MyCte.c, HighestNumber = (SELECT MAX(Value.Val) FROM
1 voteThanks for letting us know about this issue. It should now be fixed in the latest build of SQL Prompt (7.1.0.314)
-
Auto complete/intellisense suggestions using PIVOT
Using PIVOT the wrong alias is suggested in the intellisense window as it is the alias from the FROM clause, not the PIVOT clause that is displayed.
The same goes for the auto complete, where field names is (automatically) prefixed with the wrong alias (I know this feature can be disabled...)
Ex:[code]CREATE TABLE dbo.tbTest(
Id INT,
foo VARCHAR(3),
bar FLOAT
)
GO
INSERT INTO dbo.tbTest
VALUES (1, 'foo', 2)
, (2, 'bar', 3)
, (3, 'foo', 4)
GO
SELECT *
FROM (
SELECT *
FROM dbo.tbTest AS tt
) pvt
PIVOT (
MAX(bar) FOR foo IN ([foo], [bar])
)p
[/code]…3 votesThis is included in SQL Prompt 7.1 which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
qualify column names with table: temporary tables
The qualify column names should work with temporary tables as well.
2 votesThis is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Recognize double quotes for object names in the same way as square brackets.
Please enable SQL Prompt to have the same behavior with double quotes as with square brackets.
For example, typing:
SELECT * FROM [MyTable]
will allow the expansion of the asterisk, while
SELECT * FROM "MyTable"
does not.SET QUOTED_IDENTIFIER is ON by default. Also, many Oracle "converts" use the format "SchemaName"."TableName".
1 voteThis is included in SQL Prompt 6.3, which can be downloaded from http://www.red-gate.com/products/sql-development/sql-prompt/
- Don't see your idea?