Reputation: 59
I was able to join another database into my query in access as shown
LEFT JOIN [X:\Zodds and Ends\Emer\T2Data.MDB].tblContacts
ON EeDetails.BankCode = tblContacts.FirstName)
I am changing this query over to SQL Server but I cant find a way of linking the database I have also tried this but it doesn't work.
LEFT JOIN T2Ddata..tblContacts ON EeDetails.BankCode = tblContacts.FirstName)
Upvotes: 1
Views: 56
Reputation: 32713
The syntax is LEFT JOIN databasename.schemaname.tablename
The default schema is dbo. So it is usually: databasename.dbo.tablename
Also, it is a good idea to use an alias
LEFT JOIN T2Ddata.dbo.tblContacts c ON c.id = e.ContactId)
I doubt if you would be joining on FirstName?
Upvotes: 2