PDA

View Full Version : Joining 2 databases



sliwo
Nov 18th, 2005, 01:02 AM
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

Brandoe85
Nov 18th, 2005, 01:31 AM
Just put the database name first, followed by a period:
select * from Northwind.dbo.Categories

Good luck;

sliwo
Nov 18th, 2005, 10:37 PM
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