Kim,
It is: DatabaseName.SchemaName.TableName.ColumnName
You missed the schema (often "dbo") which is also part of the name.
Although, if you use an alias for the table in the code, you would never see
all four of these names together. Instead it would look like:
SELECT Local.KeyColumn, Remote.ColumnName
From dbo.MyLocalTable AS Local
JOIN DatabaseName.SchemaName.TableName AS Remote
ON Local.KeyColumn = Remote.KeyColumn
RLF
"K" wrote in message
> How do I reference tables in different databases in a query? I have tried
> database name.table name.field name and that hasn't worked.
>
> TIA,
>
> Kim
>> Stay informed about: Query Multiple databases