ORDER BY suggestions do not include SELECT aliases

MikeyCMikeyC 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.
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

  • Anu DAnu D Posts: 876 Silver 3
    Apologies for inconvenience caused.

    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.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • MikeyCMikeyC Posts: 249 Bronze 3
    Can I assume by the SP number that this issue has been logged for a very long time and hasn't been added through a number of versions of SQL Prompt?
Sign In or Register to comment.