Bruce,
For SQL Server 2005 use this:
linked_server_name.catalog.schema.object_name

Example:
INNER JOIN SEATTLESales.AdventureWorks.Sales.SalesOrderDetail sod
ON p.ProductID = sod.ProductID

In SQL Server Management Studio, there is a section for Linked Servers
where you can get the name of the link and check on the security
credentials that are used.

Good luck,
Mike Chabot

On 10/3/07, Bruce Sorge <[EMAIL PROTECTED]> wrote:
> Good afternoon,
> It has been a while since I worked with linked servers, but here I find
> myself with this issue.
> I have a linked server that I am querying only one table called Street.
> What I need to do is to create a SP on my local server that will allow
> me to use this linked server.
>
> For instance, on the linked server, the Street table has the following
> fields that I use:
> RecordID, Prefix, Name, Type and Suffix.
>
> In the local server, I have a table called Bus_Routes. That has the
> following fields:
> Schedule_ID, School_Id, Route_ID, Main_St_ID, X_Street_ID
>
> The fields Main_St_ID and X_Street_ID link to the RecordID field in the
> Street table on the linked server. The Street table on my linked server
> is updated by another application at another location so all I am doing
> is reading from this table. I need to pull Prefix, Name, Type and Suffix
> based on the RecordID from the Bus_Schedules table. I am building a
> string that will look like this: N Main [EMAIL PROTECTED] Elm Rd. I know how 
> to build
> the string. I just need to know how to query the linked table by joining
> the local table.
>
> Hope this makes sense
>
> Bruce
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2963
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to