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 |
|
vijayanto
Starting Member
16 Posts |
Posted - 2009-06-19 : 04:10:11
|
| hi friends, i plan to get datas from two databases in sql queryand the two databases contain different tables i want to the table datas from those two databasesregards vijay |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2009-06-19 : 07:24:21
|
| My guess is that you want data from tables that are in different databases? Are the tables linked in any way? Are they on different servers? This might helpSelect <columns> from [databasename].[objectowner].table Jim |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-20 : 02:22:26
|
quote: Originally posted by vijayanto hi friends, i plan to get datas from two databases in sql queryand the two databases contain different tables i want to the table datas from those two databasesregards vijay
are you trying to combine the rows from both tables? in that case what you need is to create a view with UNION ALL query to join both databse tables data.However if your effort is to join the fields from both tables into single resultset then what you need is a view with a join between them to get all columns in single resultset. |
 |
|
|
|
|
|