July 28, 2009 at 7:18 am
I've defined the linked server and I can select from the remote tables, but I get an "invalid column name" error on the linked server name when I perform a function call from the linked server.
any suggestion please
July 28, 2009 at 7:27 am
show us your function call;
here's an example of using a linked server to get a function call back, does this help?
exec ServerName.master.dbo.sp_executesql N'Select SERVERPROPERTY(''MachineName'')'
Lowell
July 28, 2009 at 7:36 am
Lowell (7/28/2009)
show us your function call;here's an example of using a linked server to get a function call back, does this help?
exec ServerName.master.dbo.sp_executesql N'Select SERVERPROPERTY(''MachineName'')'
select [LINKEDSERVER1].DB.dbo.T_DATE('D')
this run the function named T_DATE on remote DATABASE DB
it give error invalid column name LINKEDSERVER1
I need those function and more from the server to be included in queries
July 28, 2009 at 9:38 am
ali.m.habib (7/28/2009)
Lowell (7/28/2009)
show us your function call;here's an example of using a linked server to get a function call back, does this help?
exec ServerName.master.dbo.sp_executesql N'Select SERVERPROPERTY(''MachineName'')'
select [LINKEDSERVER1].DB.dbo.T_DATE('D')
this run the function named T_DATE on remote DATABASE DB
it give error invalid column name LINKEDSERVER1
I need those function and more from the server to be included in queries
Looking at your code your trying to use LinkedServer the wrong way. (T_DATE looks like a scalar funtion)
LinkedServer is about distributed queries and a rowset is expected from the linked server
SELECT * FROM OPENQUERY(LINKEDSERVER1,'SELECT dbo.T_DATE(''D'')')
should work
Vasc
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply