Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick help on linked server syntax

Status
Not open for further replies.
Joined
Jun 27, 2001
Messages
837
Location
US
I have 2 SQL 2000 servers. One has been added as a linked server.
They both have a db called claims. If I am on server 1 and want to write a sql statement I am stuck with the write syntax

I tried select patient.* from testedi..claims.

The server is linked using the sa user. I know this is simple but in a hurry and stuck. THe servers are on same domain.
Thanks
 
I assume that the table "Patient" exists in both "Claims" databases. I also assume that the remote server in this case is named "testedi."

If you are selecting from Patient you must name the table in the FROM clause. The full name has four parts - server.dbname.owner.tablename

select * from testedi.claims..patient

Or

select * from testedi.claims.dbo.patient
Terry L. Broadbent
Programming and Computing Resources
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top