all groups > sql server programming > july 2003 >
You're in the

sql server programming

group:

Select of non DBO Table in UDF...can't do it.



Select of non DBO Table in UDF...can't do it. al
7/15/2003 11:53:40 PM
sql server programming: I have some tables with the same name but owned by different users. I have
some UDFs that return a table variable. The SELECT statements in the UDF
cannot 'see' the non dbo tables. The Same SELECT does work outside of the
UDF. In the SELECT statement there is no owner prefix. If I prefix it to the
specific user it works , but that won't do because I want the table the user
owns to be returned, I cannot specify the owner.

Is this a Bug?

al

Re: Select of non DBO Table in UDF...can't do it. Dean Savovic
7/17/2003 8:56:21 AM
It seems to me that you have broken chain of ownership.

--
Dean Savovic
www.teched.hr


[quoted text, click to view]

Re: Select of non DBO Table in UDF...can't do it. al
7/17/2003 12:28:31 PM
I know know what the expected behavior is, but I think that it would be
better if when user 'al' calls

EXEC dbo.spTest()

and it does

SELECT * FROM TestTable

al would get al.TestTable not dbo.TestTable
-------
My wish list is this, a simple mechanism for passing arrays and Something
like Table Pointers...
-al

[quoted text, click to view]

AddThis Social Bookmark Button