Link to home
Start Free TrialLog in
Avatar of krbnldy
krbnldy

asked on

getting data froma different server

I have this code to get a records from a different server.  The name of the server is sqlclust.  When I run the following code and modify the code "sqlclust.Canondn.dbo.vre-----------" i get an error saying i have to run sp_addlinked server.  I am not familiar with that.  How do I modify the code below to  get the records frm the db called canondn that resides on server sqlclust.

SELECT     d.Model, d.Ref_ID, Customer_Name_ID as Customer_Name_ID, @SID as SourceID            
FROM          Canondn.dbo.vreferral_for_CustomerMaster  d
               Inner Join tblCustomer_Name c On
            @Sid = c.SourceID
            and d.Ref_ID = c.R_CustID
WHERE d.Model is not null AND d.Model <> ' ' and CMRecord is Null

thank you
ASKER CERTIFIED SOLUTION
Avatar of Kevin Hill
Kevin Hill
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial