Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Two Servers Two databases one query

33 views
Skip to first unread message

Ken Pinard

unread,
Mar 22, 2001, 8:00:03 PM3/22/01
to
Is there a way to run a view from one SQL Server (A) linking a table (C) on
SQL Server (A) with a table (D) on SQL Server (B)?

Ken


Don R. Watters

unread,
Mar 22, 2001, 8:13:09 PM3/22/01
to
Hi Ken,

Yes, use dotted syntax to reference the server you want to call. You might
have to set up a linked server using sp_AddLinkedServer.

CREATE VIEW TestView
AS
SELECT A.FieldName, B. FieldName
FROM ServerName.DatabaseName.dbo.TableName A,
ServerName.DatabaseName.dbo.TableName B
WHERE A.FieldName = B.FieldName

HTH
--
Regards,

Don R. Watters
Database Admin\Developer
PhotoWorks, Inc.

"Ken Pinard" <k...@pinard.com> wrote in message
news:#M#YaPzsAHA.1224@tkmsftngp04...

Ken Pinard

unread,
Mar 23, 2001, 2:48:40 AM3/23/01
to
Thanks, That did the trick,

Thank you,
Ken

"Don R. Watters" <Do...@PhotoWorks.Com> wrote in message
news:#QwuMVzsAHA.1892@tkmsftngp04...

John Gose

unread,
Mar 26, 2001, 9:07:37 PM3/26/01
to
Thanks Don. Looks like that did the trick for Ken.

John Gose
Microsoft SQL Server Support
--------------------
| From: "Ken Pinard" <k...@pinard.com>
| References: <#M#YaPzsAHA.1224@tkmsftngp04> <#QwuMVzsAHA.1892@tkmsftngp04>
| Subject: Re: Two Servers Two databases one query
| Date: Thu, 22 Mar 2001 23:48:40 -0800
| Lines: 43
|
<Snip of Header Stuff>

0 new messages