October 16, 2010 at 6:00 am
I have created the following function:
CREATE FUNCTION [dbo].[DailyActivity]
(
)
RETURNS @SalesData TABLE
(
...columns
)
AS
BEGIN
...statements
RETURN
END
GO
When I try to select from the function i.e SELECT * FROM dbo.DailyActivity() the function name is underlined in red and the hover message is "Invalid Object Name". However, the statement still executes and the data is returned?! I have also tried SELECT * FROM dbo.DailyActivity but the same occurs.
I am using SQL Server 2008 R2.
October 16, 2010 at 6:58 am
In SSMS, select Edit | Intellisense | Refresh Local Cache
Apparently, you built the function after opening the query window.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 16, 2010 at 7:05 am
Thanks Wayne, I didn't know about that IntelliSense cache 🙂
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply