Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Select Data From Different Databases on Different Servers

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-10-21 : 08:44:57
Greg writes "I am running SQL Server 2000 and Using the DTS Engine to Pull Data from one Server to Another. I am Currently using a Select Statement with the in Clause to retreive based on several values. I would like to put these values in a table and do a JOIN from the Two Systems. Let me define as best I can.
System 1
Table 1 (Main Data Table)

System 2
Receiving Table of the results
ID Table (Contains the List of Ids to pull from above Table).

Select * from system1.Table1 as T JOIN system2.IDTable as I
on T.id = I.ID
Where T.Date >= '10-17-2002' and T.Date <= '10-18-02'

I am using the Connection Icon and the Transform option, but I get invalid objects on the Second table.

Please let me know"

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2002-10-21 : 09:24:04
search here for info on multi-part naming convention....but in essence you need to

select * from system1.database1.databaseowner1.table1, system2.database2.databaseowner2.table2

(database1(2) + databaseowner1(2) values may need to reversed....)

Go to Top of Page
   

- Advertisement -