User defined function question 
Author Message
 User defined function question
Can I access the user defined function of a linked sql server?
Tried using the convention
sqlservername.databasename.ownername.functionname
it didn't work but
databasename.ownername.functionname
works


Mon, 05 May 2003 03:00:00 GMT
 User defined function question

 Gokhan - nope, just install the UDF on all your servers.  

 > Can I access the user defined function of a linked sql server?

Quote:
> Tried using the convention
> sqlservername.databasename.ownername.functionname
> it didn't work but
> databasename.ownername.functionname
> works

 Neil Pike MVP/MCSE.  Protech Computing Ltd
 Reply here - no email
 SQL FAQ (484 entries) see
 http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
 (faqxxx.zip in lib 7)
 or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
 or www.sqlserverfaq.com
 or www.mssqlserver.com/faq


Tue, 06 May 2003 03:00:00 GMT
 User defined function question
I wanted to return a table from a user defined function

Quote:
> Gokhan - nope, just install the UDF on all your servers.

>  > Can I access the user defined function of a linked sql server?
> > Tried using the convention
> > sqlservername.databasename.ownername.functionname
> > it didn't work but
> > databasename.ownername.functionname
> > works

>  Neil Pike MVP/MCSE.  Protech Computing Ltd
>  Reply here - no email
>  SQL FAQ (484 entries) see
>  http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
>  (faqxxx.zip in lib 7)
>  or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
>  or www.sqlserverfaq.com
>  or www.mssqlserver.com/faq



Tue, 06 May 2003 03:00:00 GMT
 User defined function question
BOL say about EXECUTING a procedure:

A procedure that has been created in another database can be executed if the
user executing the procedure owns the procedure or has the appropriate
permission to execute it in that database. A procedure can be executed on
another server running Microsoft? SQL ServerT if the user executing the
procedure has the appropriate permission to use that server (remote access)
and to execute the procedure in that database. If a server name is specified
but no database name is specified, SQL Server looks for the procedure in the
user's default database.

However, it also says that to return a table:

However, when you call SQL Server built-in functions that return a table,
you must add the prefix :: to the name of the function:

SELECT * FROM ::fn_helpcollations()

--
Doo
Senior Data Architect / DBA
PlanetJam Media Group


Quote:
> I wanted to return a table from a user defined function


> > Gokhan - nope, just install the UDF on all your servers.

> >  > Can I access the user defined function of a linked sql server?
> > > Tried using the convention
> > > sqlservername.databasename.ownername.functionname
> > > it didn't work but
> > > databasename.ownername.functionname
> > > works

> >  Neil Pike MVP/MCSE.  Protech Computing Ltd
> >  Reply here - no email
> >  SQL FAQ (484 entries) see
> >  http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
> >  (faqxxx.zip in lib 7)
> >  or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
> >  or www.sqlserverfaq.com
> >  or www.mssqlserver.com/faq



Tue, 06 May 2003 03:00:00 GMT
 User defined function question
 The user-defined function can always reference a table on another system....

 But would a remote stored-proc not achieve what you want with an INSERT ...
EXEC .. type invocation?

 > I wanted to return a table from a user defined function

 Neil Pike MVP/MCSE.  Protech Computing Ltd
 Reply here - no email
 SQL FAQ (484 entries) see
 http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
 (faqxxx.zip in lib 7)
 or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
 or www.sqlserverfaq.com
 or www.mssqlserver.com/faq



Tue, 06 May 2003 03:00:00 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. User Defined Function Question

2. User-defined function question

3. A user defined function question

4. user defined function question

5. call a user defined function from another user-defined function

6. User Defined Functions (Easy Question)

7. Question on User-Defined Functions

8. Question on user defined function (SQL Server 2000)

9. more question about adding values from user defined function

10. Question about user-defined functions

11. questions on user-defined function

12. Question on user defined function (SQL Server 2000)


 
Powered by phpBB® Forum Software