I added a linked server, which is showing in the linked server list, but when I query it, it throws an error with the db server name.
EXEC sp_helpserver
EXE
The accepted answer works for me.
Also, in MSSQLMS, you can browse the tree in the Object Explorer to the table you want to query.
[Server] -> Server Objects -> Linked Servers -> [Linked server] -> Catalogs -> [Database] -> [table]
then Right click, Script Table as, SELECT To, New Query Window
And the query will be generated for you with the right FROM, which you can use in your JOIN