dbTalk Databases Forums  

Using DATAPUMP is it possible to read from 2 different databases on same server in the source tab?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Using DATAPUMP is it possible to read from 2 different databases on same server in the source tab? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Using DATAPUMP is it possible to read from 2 different databases on same server in the source tab? - 06-26-2006 , 05:14 PM







we are using SQL Server SP 4 on W2003 box.

we have a source database otr and a destination newbus

we currently read from the source and insert into destination.

now we want to limit what we query from the source by joining it in a table in
destination.

is this possible. how can i see a table in one database that resides in
another database?

Reply With Quote
  #2  
Old   
Matt
 
Posts: n/a

Default RE: Using DATAPUMP is it possible to read from 2 different databases o - 06-27-2006 , 08:40 PM






It sounds like what you want to do is use a 3-part naming convention to
reference your source and destination tables. The 3-part naming convention
references tables in the following format: databaseName.ownerName.tableName

e.g.
SELECT *
FROM otr.dbo.otrTable AS t1
JOIN newbus.dbo.newbusTable AS t2
ON t1.Key = t2.Key

Just replace the "otrTable" and "newbusTable" with the table names from the
otr and newbus databases, respecitvely. Good luck!

"Colin" wrote:

Quote:
we are using SQL Server SP 4 on W2003 box.

we have a source database otr and a destination newbus

we currently read from the source and insert into destination.

now we want to limit what we query from the source by joining it in a table in
destination.

is this possible. how can i see a table in one database that resides in
another database?


Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default RE: Using DATAPUMP is it possible to read from 2 different databases o - 06-30-2006 , 07:54 AM



In article <6A2B8085-B5BD-4DFD-A784-F9647B7B3336 (AT) microsoft (DOT) com>, =?Utf-8?B?TWF0dA==?= <Matt (AT) discussions (DOT) microsoft.com> wrote:
Quote:
It sounds like what you want to do is use a 3-part naming convention to
reference your source and destination tables. The 3-part naming convention
references tables in the following format: databaseName.ownerName.tableName

e.g.
SELECT *
FROM otr.dbo.otrTable AS t1
JOIN newbus.dbo.newbusTable AS t2
ON t1.Key = t2.Key

Just replace the "otrTable" and "newbusTable" with the table names from the
otr and newbus databases, respecitvely. Good luck!

"Colin" wrote:


we are using SQL Server SP 4 on W2003 box.

we have a source database otr and a destination newbus

we currently read from the source and insert into destination.

now we want to limit what we query from the source by joining it in a table
in
destination.

is this possible. how can i see a table in one database that resides in
another database?

thanks,
didn't work until I added otr as a user in newbus


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.