locked
query join 2 databases RRS feed

  • Question

  • User-977905242 posted

    Hello

    How to execute a query on 2 different databases ( an SQL query with joins)?

    Thanks

    Friday, June 22, 2012 9:40 AM

Answers

  • User364663285 posted

    Hello

    How to execute a query on 2 different databases ( an SQL query with joins)?

    Thanks

    Create a linked server to link to other DB

    http://msdn.microsoft.com/en-us/library/ms188279.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, June 23, 2012 3:21 AM

All replies

  • User-1516073966 posted

    Hi

    Refer the post below in sql server.

    http://forums.asp.net/t/1254974.aspx/1

    Friday, June 22, 2012 9:43 AM
  • User-287491473 posted

    You would need to create a link between the two database servers.  Below is a good artice on how to do this.  Near the end are examples on how to query across the link after it is set up.

    http://msdn.microsoft.com/en-us/library/ms190479.aspx

    Friday, June 22, 2012 9:45 AM
  • User364663285 posted

    Hello

    How to execute a query on 2 different databases ( an SQL query with joins)?

    Thanks

    Create a linked server to link to other DB

    http://msdn.microsoft.com/en-us/library/ms188279.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, June 23, 2012 3:21 AM