Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Joining 2 databases

    Hi all,

    Can anyone provide me with the standard syntax to allow me to join tables that sit in two different sql server databases?

    Many thanks

    sliwo

  • #2
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Just put the database name first, followed by a period:
    select * from Northwind.dbo.Categories

    Good luck;

  • #3
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Brando

    Thanks for your reply. so am i right i assuming it will always follow the standard format of:

    databasename.dbo.tablename.fieldname

    Thanks

    sliwo


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •