![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
#3
| |||
| |||
|
|
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, |
![]() |
| Thread Tools | |
| Display Modes | |
| |