ORDER BY suggestions do not include SELECT aliases
MikeyC
Posts: 249 Bronze 3
SQL Prompt 4.0.4.11 doesn't suggest aliases defined in the SELECT portion of a query in the ORDER BY portion.
With the above query "Field1" should be listed as a suggestion.
Same applies when coming from a table:
With the above query "Alias1" should be listed as a suggestion.
SELECT 'Test' AS Field1 ORDER BY <cursor>
With the above query "Field1" should be listed as a suggestion.
Same applies when coming from a table:
SELECT backup_set_id AS Alias1 FROM msdb.dbo.backupfile ORDER BY <cursor>
With the above query "Alias1" should be listed as a suggestion.
Comments
I have logged this in our internal tracking system whose id is SP-1911.
It will be reviewed for a future release of SQL Prompt although we have not timescales for this at present.
Kindly let us know if you have any issues or questions regarding the product,I'll like to help.
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com