Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Public UDF
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01141128
Message ID:
01141248
Vues:
17
The UDF needs to get it's data from the current database and calling the UDF with Master in front will cause the UDF to try and get the data from Master.

-Dan

>SELECT Master.dbo.MyFunc()
>
>>Borislav,
>>
>>Thanks for the response. I added it to the master DB and I am still getting the Invalid object name when trying to use it.
>>
>>-Dan
>>
>>>>I would like to create a public UDF and use it in a SELECT statement. The UDF works correctly when it's located in the same database but I don't want to have to update multiple databases if the UDF ever changes. I have created a UDF and issued -
>>>>
>>>>
>>>>GRANT Execute ON myudf to public
>>>>
>>>>
>>>>How can I then use this UDF in a SELECT in a different database without referencing the database that the UDF is in? I get the error "Invalid object name 'dbo.myudf' when executing -
>>>>
>>>>
>>>>SELECT dbo.myudf()
>>>>
>>>>
>>>>TIA
>>>>
>>>>-Dan
>>>
>>>Why not create it in Master DB?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform