SQL Prompt Bug - INSERT/SELECT column highlighting
ubercam
Posts: 1 New member
in SQL Prompt
I just discovered a bug with the insert / select column highlighting feature.
The bug appears to be caused by incorrect parsing of columns where AT TIME ZONE is used. This is the only instance of this issue I have encountered. I'm not sure if it applies to other functions or features as well. Strangely, it occurs only in one direction, as shown in the examples below.
I clicked on expiryTime in the INSERT list, and it highlights the correct column in the SELECT list, but only up to the end of AT TIME ZONE. It ignores the rest of the line statement.
Clicking the next column highlights the final part of the AT TIME ZONE statement, and not the expected column.
If AT TIME ZONE is used multiple times in a row like in the second and third last columns, everything up to the end of the last instance of AT TIME ZONE is selected. It doesn't matter what follows AT TIME ZONE, be it a variable, string literal, column, or function.
Clicking a column a bit further down, you can see the highlighting is now off by one. This gets worse and worse as you go if you have more columns with AT TIME ZONE.
However, it all works perfectly if I click on the SELECT column itself, the correct column in the INSERT list is highlighted.
For what it's worth I'm running SSMS 19.1.
Thanks
Cam
The bug appears to be caused by incorrect parsing of columns where AT TIME ZONE is used. This is the only instance of this issue I have encountered. I'm not sure if it applies to other functions or features as well. Strangely, it occurs only in one direction, as shown in the examples below.
I clicked on expiryTime in the INSERT list, and it highlights the correct column in the SELECT list, but only up to the end of AT TIME ZONE. It ignores the rest of the line statement.
Clicking the next column highlights the final part of the AT TIME ZONE statement, and not the expected column.
If AT TIME ZONE is used multiple times in a row like in the second and third last columns, everything up to the end of the last instance of AT TIME ZONE is selected. It doesn't matter what follows AT TIME ZONE, be it a variable, string literal, column, or function.
Clicking a column a bit further down, you can see the highlighting is now off by one. This gets worse and worse as you go if you have more columns with AT TIME ZONE.
However, it all works perfectly if I click on the SELECT column itself, the correct column in the INSERT list is highlighted.
For what it's worth I'm running SSMS 19.1.
Thanks
Cam
Tagged:
Answers
Thank you for submitting this bug and your steps to recreate.
This will be escalated to our development team for their appraisal.
I will endeavor to update this post with their findings and steps to resolve this.
Our internal bug ref # is TBE-123 and will be resolved as part of a future bug release.
I shall continue to update this forum post with updates and you can also monitor the SQL Prompt release notes for references to this bug fix being available.
https://documentation.red-gate.com/sp/release-notes-and-other-versions/sql-prompt-10-13-release-notes
Hi @ubercam
Thank you for your patience whilst our development team worked on this issue.
Version 10.13.13 has been released, which includes a fix for this issue.
Are you able to patch at your earliest convenience and verify this has been resolved for you
Download of the latest version available here: https://download.red-gate.com/checkforupdates/SQLPrompt/SQLPrompt_10.13.13.2147.exe
Patch notes available here: https://documentation.red-gate.com/sp/release-notes-and-other-versions/sql-prompt-10-13-release-notes
SQL Prompt 10.13 release notes
10.13.13.2147 - Released on 22 August 2023
Features
Fixes