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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-04-11 : 09:23:20
|
| surjit writes "How can i retrieve data from different tables that are again in different databases.Suppose i hava two databases D1, D2D1 has one table T1and D2 has one table T2i want to write a query to access data from T1 and T2." |
|
|
rookie_sql
Constraint Violating Yak Guru
443 Posts |
Posted - 2006-04-11 : 09:27:38
|
| you can use a DTS packages that can access tables from different database, and put them into one of the 2 databases so they are on a single Database. Are you using SQL 2000? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-11 : 09:49:10
|
| If you are in D1, thenSelect * from T1Select * from D2.dbo.T2MadhivananFailing to plan is Planning to fail |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-11 : 09:56:13
|
| ... or possibly even:[code]Select * from T1 JOIN D2.dbo.T2 ON T2.MyPK = T1.MyPK[code]Kristen |
 |
|
|
|
|
|