Defect Submission: SUM breaks Suggestions Window
Use of the aggregate function SUM() in a SELECT list prevents suggestions pertaining to the context of the query from displaying prior to the placement of the function call within the SELECT list. This most likely applies to other functions as well.
STEPS TO REPRODUCE:
1. Enter the following code:
USE [AdventureWorks2008] GO SELECT SUM([SOD].[OrderQty]) AS [OrderQtyTotal], FROM [Sales].[SalesOrderDetail] AS SOD WHERE [SOD].[SalesOrderID] = 43659
2. Place the cursor on line 5 and type "Prod". The SQL Prompt suggestions window should prompt for the entry of [SOD].[ProductID]. Instead, it prompts at the table level ([Production].[Product]).
3. Place the cursor on line 7 and type "Prod". The SQL Prompt suggestions window prompts for the entry of [SOD].[ProductID] as expected.
This behavior is not a result of the layout of the code used in the example.