var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Stored Procedure Query
I have a query in Stored procedures...See if u could help me...
I am using two Databases Cobank and BR0001
which are on 2 different machines....
I am writing stored procedures in Cobank
In that stored procedure I m writing a query to access a table in BR0001
So do u know how to proceed?
I tried by passing servername as a parameter to stored proc.
CREATE PROCEDURE ViewBranchDetail
@localDBName as nvarchar(20)
@servername as nvarchar(200)
exec('Select * from opendatasource ( '''+@servername+''' ) . '''+@localDBName+'''..BranchDetail' )
exec('Select * from opendatasource (''SQLOLEDB'''+','+''' Data Source=localhost;Initial Catalog=BR0001;Integrated Security=True )'''+ '..BranchDetail' )
Cross-posting is verboten. Fragments responses and wastes people's time.