Missing Suggestions in Sub-Queries in SELECT portion

MikeyCMikeyC Posts: 249 Bronze 3
SQL Prompt 4.0.4.11 doesn't list the proper suggestions in sub-queries in the SELECT portion of a query:
SELECT 
	*,
	(SELECT COUNT(*) FROM msdb.dbo.backupfile C WHERE C.backup_set_id = <cursor>
FROM msdb.dbo.backupfile B

At this point it should offer B as a suggestion, and it doesn't. In some case you can get it to:
SELECT 
	*,
	(SELECT COUNT(*) FROM msdb.dbo.backupfile C WHERE C.backup_set_id = <cursor>) AS Num_Set_Records
FROM msdb.dbo.backupfile B

But in all cases I can't get it to suggest the fields in this query:
SELECT 
	*,
	(SELECT COUNT(*) FROM msdb.dbo.backupfile C WHERE C.backup_set_id = B.<cursor>) AS Num_Set_Records
FROM msdb.dbo.backupfile B

At this point it should suggest all the fields from the table aliased as B.

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

    It will be reviewed by our development team 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
Sign In or Register to comment.