Groups | Blog | Home
all groups > sql server dts > june 2006 >

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


cl NO[at]SPAM yahoo.com
6/26/2006 5:14:01 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
Matt
6/27/2006 6:40:01 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!

[quoted text, click to view]
sdfdfwetudfyt NO[at]SPAM 7fdfster.com
6/30/2006 7:54:02 AM
[quoted text, click to view]
thanks,
AddThis Social Bookmark Button