Inter-Database References

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Thierry Marneffe

    Inter-Database References

    Hello

    Suppose a database Db1 with tables tl1 and tl2 and a second database db2
    with tables tl3 et tl4.

    Is it possible to make a join between tables of the two databases ?

    As for example, Select * from tl1 INNER JOIN tl3 where tl1.Field1 =
    tl3.Field3

    Thank for any help

    Thierry





  • Srinivas Sampangi

    #2
    Re: Inter-Database References

    If we have the databases Db1 and Db2 on the same server
    we can join as follows


    Select *
    from db1..tl1 a
    INNER JOIN db2..tl3 b on a.Field1 = b.Field3


    HTH
    Srinivas Sampangi






    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

    Comment

    Working...