e.g. something along the lines of joining where db1.users.user_id =
db2.employees.employee_id in another database.
Hope you can help.
Regards,
Ben.
--
Business Advisor & IT Consultant
OPAR Ltd.
--
Tony Rogerson SQL Server MVP
Torver Computer Consultants Ltd
http://www.sql-server.co.uk [UK User Group, FAQ, KB's etc..]
http://www.sql-server.co.uk/tr [To Hire me]
"www.webtechy.co.uk" <newsg...@webtechy.co.uk> wrote in message
news:Veu19.4513$fw4.84843@newsfep2-gui...
How to join tables from different databases?
http://vyaskn.tripod.com/programming_faq.htm#q13
--
HTH,
Vyas, MVP (SQL Server)
Check out my SQL Server website @
http://vyaskn.tripod.com/
"www.webtechy.co.uk" <newsg...@webtechy.co.uk> wrote in message
news:Veu19.4513$fw4.84843@newsfep2-gui...
select
*
from
OtherDB.dbo.OtherTable o
join
MyDB.dbo.MyTable m on m.ID = o.ID
--
Tom
----------------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCT
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
www.apress.com
---
www.webtechy.co.uk wrote in message ...
Regards,
Ben.
"Narayana Vyas Kondreddi" <answ...@hotmail.com> wrote in message
news:u4Ymrf7NCHA.2196@tkmsftngp08...
Use the 3 part naming convention.
The 2 Databases are: db1, db2
SELECT
c.*,
i.Invoice_Number
FROM
db1.dbo.Customer c
JOIN
db2.dbo.Invoice i
ON
c.CustomerID = i.CustomerID
"www.webtechy.co.uk" <newsg...@webtechy.co.uk> wrote in message news:<Veu19.4513$fw4.84843@newsfep2-gui>...
db1.dbo.users
Hope that helps someone else.
Cheers,
Ben.
"www.webtechy.co.uk" <newsg...@webtechy.co.uk> wrote in message
news:Veu19.4513$fw4.84843@newsfep2-gui...