locked
Join two table from different server RRS feed

  • Question

  • Hi,

    I have two table(Dataset from sql command) from different server. I want to use first table result set join with other server table and get the result and insert in different server destination.

    Kindly suggest, I did the same from merge join but I want to get data from other table only required dataset. because 2nd table output has more than 1,00,000 record.

    Thursday, November 10, 2016 9:35 AM

All replies

  • You can use Lookup task or Merge join. If you use Lookup task then you can select the matched record to the different server, if you use merge join you can specify inner join and use the result to different server. Refer the links below

    https://msdn.microsoft.com/en-us/library/ms141775(v=sql.130).aspx
    https://msdn.microsoft.com/en-us/library/ms141821.aspx


    Mark as ANSWER if I helped you today :-) www.sql-articles.com

    • Proposed as answer by Eric__Zhang Monday, November 21, 2016 10:08 AM
    Thursday, November 10, 2016 10:23 AM
  • If data is huge I would create a package that moves the data from server A and B into the server C and over there perform a join to insert the data into a table

    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance
    SQL Server Integration Services: Business Intelligence

    • Proposed as answer by Eric__Zhang Monday, November 21, 2016 10:08 AM
    Thursday, November 10, 2016 2:18 PM
  • As Uri suggested, you can create a package to copy data from the server A and B to the server C and then do the  JOIN on the server C.

    A Fan of SSIS, SSRS and SSAS

    Thursday, November 10, 2016 2:29 PM