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 |
|
Avinash
Starting Member
5 Posts |
Posted - 2007-12-04 : 07:00:31
|
| Hi Experts,I am using sql server 2005. I have two database in same server i.e. DB1 and DB2. DB1 contains table1 and DB2 contains table2.i have to run a sql query in DB2 to fetch data from table1 and to update in table2.Please suggest.Thanks in advance. |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-12-04 : 07:09:14
|
| [code]Update t2Set Col = t1.colFrom db2.dbo.table2 t2 join db1.dbo.table1 t1on t1.key = t2.key[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
Avinash
Starting Member
5 Posts |
Posted - 2007-12-04 : 08:31:26
|
| Thanks Harsh..It's working fine. |
 |
|
|
|
|
|