Bug found in SQL Prompt
HugoKornelis
Posts: 40 Bronze 5
in SQL Prompt
Here are the repro steps.
In a query window that has AdventureWorks2012 as the active DB (probably works in other AW versions too), paste the following code:
It should enter "soh.OrderDate" at the cursor position. Instead, it REPLACES the entire subquery with "soh.OrderDate".
Tried several times, reproduces consistently. SSMS 17.3, SQL Prompt 8.2.5.2924.
In a query window that has AdventureWorks2012 as the active DB (probably works in other AW versions too), paste the following code:
SELECT sod.SalesOrderID, (SELECT soh.OrderDate FROM Sales.SalesOrderHeader AS soh WHERE soh.SalesOrderNumber = 'SO' + CAST(sod.SalesOrderID AS varchar(10)) GROUP BY) FROM Sales.SalesOrderDetail AS sod WHERE sod.OrderQty = 12;Position the cursor directly after BY, before the closing parenthesis. Type a single space; this should bring up a list of auto-complete options. The first one is "All non-aggregated columns" (an option which I absolutely love, BTW, except in this specific case). Select it.
It should enter "soh.OrderDate" at the cursor position. Instead, it REPLACES the entire subquery with "soh.OrderDate".
Tried several times, reproduces consistently. SSMS 17.3, SQL Prompt 8.2.5.2924.
--
Hugo Kornelis
(SQL Server MVP, 2006-2016 + 2019-now // Friend of Red Gate)
Hugo Kornelis
(SQL Server MVP, 2006-2016 + 2019-now // Friend of Red Gate)
Tagged:
Comments
Thanks for reporting it! We have reproduced the issue in Prompt 9.0.0.3116 as well. It's logged as a bug now and please keep an eye on the release note!
Tianjiao Li | Redgate Software
Have you visited our Help Center?
This issue should be fixed in our latest version of SQL Prompt 9.0.3.3299 (installer here).
You can find more information about this release in this forum post.
Kind regards,
Fabiola