SQL Server 2005 64-bit 9.00.3042 SP2
When I map a database user to a login, I can specify a default schema
for that user. After that, any SQL from that user w/o an explicit
schema will be resolved to that default schema.
I would like for this to happen in regards to user-defined functions
(in this case, a scalar-valued function). However, it looks as if
I must always explicitly specify the schema when using the function.
In other words: I have a function foo() and a table bar in schema
myschema. My default schema is myschema.
This works:
select blah from bar
And this works:
select blah,myschema.foo() from bar
But this apparently won't work:
select blah,foo() from bar
Why?
Is default schema not considered in user-defined function name
resolution?
TIA
aj