Category: SQL Server

How to run a stored procedure on a linked server and fetch the data on SQL Server 2005:

This is carried out by using openquery. Setup the linked server in server objects, then call the server using a tabled-valued function

CREATE FUNCTION p_get_closing_prices
(	
	-- Add the parameters for the function here
	@valueDate datetime
	
)
RETURNS TABLE 
AS
RETURN 
(

select * from openquery(SALD157, 'exec CreditPricer.dbo.p_get_closing_prices ''18 feb 2008''') 

	
)


 

Tags:

SQL server

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.