Wednesday, March 28, 2012

Link table from another database?

Recently moved on SQL Server 2000.
Looks like I saw somewhere, but can't find now if can link the table from
another database on the same SQL Server 2000.
Also if it's possible, then question is if possible to link table from
another remote
SQL Server 2000, and from another version of SQL, from SQL Server 6.5 for
example.
Regards,
MichaelIf the tables both reside on the same instance of SQL Server there is no
need to define a linked server. Just use three parts of the four-part
naming convention:
SELECT a.Col1, b.Col2
FROM DBName.Owner.TableName a
JOIN DBName.Owner.TableName b
ON a.Col1 = b.Col1
If they reside on seperate instances, you can define a linked server (see
Books Online for full information)
and reference the tables the same way except use
LinkedServerName.DBName.Owner.TableName
"MichaelK" <michaelk@.gomobile.com> wrote in message
news:uv6WgHWKEHA.2452@.TK2MSFTNGP09.phx.gbl...
> Recently moved on SQL Server 2000.
> Looks like I saw somewhere, but can't find now if can link the table from
> another database on the same SQL Server 2000.
> Also if it's possible, then question is if possible to link table from
> another remote
> SQL Server 2000, and from another version of SQL, from SQL Server 6.5 for
> example.
> Regards,
> Michael
>

No comments:

Post a Comment