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 |
|
shm
Yak Posting Veteran
86 Posts |
Posted - 2008-10-23 : 08:01:25
|
| hi all,am taking two diff database am joining these by one of the col's from this am doing some calculation..wt my doubt is -- 1st db col has value but 2nd db col there is no value..for this am not getting any result..atleast it shld come the 1st db value and for the 2nd db col null or zero shld come...wt i shld do for this? |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2008-10-23 : 08:07:44
|
| left join should be your friend.WebfredNo, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-23 : 08:13:18
|
| if databases are in same server you could simply use like thisselect * from db1.dbo.table1 t1left join db2.dbo.table2 t2on t2.col=t1.col |
 |
|
|
|
|
|