I created a backup of a database on sql server 200. I created a new database in sql server 2008 r2.
Now when i run a view i get the error :
'function_name' is not a recognized function name.
The function is there
And i can run it using
SELECT [dbo].[function_name] (
'hjh')
GO
SELECT dbo.function_name('kjk')
Why would this problem occur when it is functioning correctly originally?
EDIT:
I think it may be a security issue as schemas owned by the user under dbo does not contain antyhing?
Make sure you are executing it in the correct database context.
If the view is in
Database2and the function is inDatabase1then you will need to fully qualify the function using the three part name:Database1.dbo.[Function_Name]All objects in a view are assumed to be in the same database as the view unless you specify otherwise.