Doug Chamberlain
Doug Chamberlain

Reputation: 11351

Is it possible to create a System UDF in SQL Server 2005

I saw that it is possible in SQL Server 2000. I want to have a function(s) where I don't have to qualify it with an owner.

for instance fn_trim() instead of dbo.fn_trim()

Upvotes: 2

Views: 152

Answers (2)

gbn
gbn

Reputation: 432541

Following on from Joe's answer

You can create a schema for your UDFs with CREATE SCHEMA (say "fn") so you could have fn.trim() rather than dbo.fn_trim().

Upvotes: 5

Joe Stefanelli
Joe Stefanelli

Reputation: 135868

This is not possible. The function has to be referenced as SchemaName.FunctionName.

As noted in the documentation:

Scalar-valued functions must be invoked by using at least the two-part name of the function.

Upvotes: 2

Related Questions