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 Database2
and the function is in Database1
then 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.
Is the view on the same database as the function?
If they are not, you need to call it like [database_name].dbo.[function_name]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With